pull down to refresh

I am subscribed to the Intigriti newsletter and I was about to unsubscribe but then I saw that they included this section:
Hacking Time: Can you spot the XSS vulnerability?
XSS might be easy to find, or not.... Can you seem to spot the cross-site scripting (XSS) vulnerability in this code snippet?
The exploitation method showcased in this example is commonly overseen by most bug bounty hunters, as they’re not aware of the possibility to pass your malicious XSS payload in this different format!
2.5k sats for the first correct answer!
2,500 sats bounty
Maybe it has a really hard time talking about it's feelings?
reply
You can write a script tag into the page with a specially crafted filter? https://example.com/index.php?filter[<script>alert('Hacked')</script>]=value
reply
you can also break it up into multiple categories and url encode because $_GET handles that. this would look normal to the user in the ui rendering as You're currently filtering by "category"
I still dont know what they wouldn't see
reply
0 sats \ 0 replies \ @sox 16 Mar
Yeah that 'oversee' part threw me off but it's the first thing you see ^^
reply
deleted by author
reply
damn, can't access, returns 429 Too Many Requests currently
reply
if that's so then @WeAreAllSatoshi got it right. But I agree with @ek, this is not something that would be missed by most bug hunters 😂
reply
i was gonna ask if the answer was already given... it did get me to signup for that newsletter. my tin foil hat assumed this post is an ad
reply
IMG source with external URL can return something nasty like SVG
reply
Rendering the filter query inside of HTML markup without being sanitized is my guess. All user input is evil
reply
100 sats \ 1 reply \ @ek OP 15 Mar
Yes but it doesn’t sound like this should be missed by most bug hunters 🤔
The exploitation method showcased in this example is commonly overseen by most bug bounty hunters, as they’re not aware of the possibility to pass your malicious XSS payload in this different format!
reply
Agree, it’s just the first thing that I saw
reply
The other option I see would be a maliciously-entered product entry with a bad name that could result in XSS when rendered, but that’s also implies compromise to your product management API
reply
’’’echo "<p>You're currently filtering by "" . implode(", ", array_keys($product_filter)) . ""</p>"; ’’’
echo "<p>You're currently filtering by "" . implode(", ", array_keys($product_filter)) . ""</p>";
That code part gives the opportunity for malicious user to injects JavaScript code into the filter parameter (e.g., via a URL query string like ?filter=<script>alert('XSS')</script>), it would be executed in the browser because the input is not sanitized or escaped.
reply
if you make a array querystring instead of a dict you can control the indexes of the array http://example.com?filter[]=1&filter[]=2&filter[]=3
reply