XSS armazenado + HTTPOnly
The article describes a stored XSS vulnerability in a PHP application where session cookies are protected by the HTTPOnly flag. It explains four scenarios in which an attacker can still cause significant impact by chaining the XSS with other flaws or insecure behaviours, such as an exposed phpinfo page, a reverse proxy, forced redirection, and DOM manipulation.
medium.com
Published on medium.com
Você encontra uma vulnerabilidade de XSS armazenado em uma aplicação PHP. Ao analisar os cookies de sessão, percebe que eles estão protegidos pela flag de segurança HTTPOnly, o que significa que não podem ser acessados por scripts em execução no navegador. À primeira vista, essa configuração parece suficiente para…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application fails to properly neutralise user input before displaying it, allowing persistent JavaScript injection, and also has other insecure configurations or behaviours that can be chained.
Impact
An attacker could steal session cookies via an exposed phpinfo page, capture credentials through a reverse proxy, cause partial denial of service by redirecting users, or deface the application, all despite HTTPOnly.
What the attacker needed
Stored XSS vulnerability; victim visits infected page; additional flaw (e.g., exposed phpinfo)
The fix
The article recommends eliminating XSS at the root through proper input validation, output encoding, and implementing Content Security Policy.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This article is about a common web security bug called stored cross-site scripting (XSS), where an attacker can plant malicious JavaScript code that runs in other users' browsers. The site tries to protect login cookies with a setting called HTTPOnly, which stops JavaScript from reading them directly. The article shows that even with that protection, an attacker can still do damage by combining the XSS with other weaknesses, like a leftover test page that reveals cookies or a fake login page that steals passwords.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.