Advisory

GHSA-6269-cqxg-mhhv

Details, part 2 of 2. The advisory

Details

Example usage:

python poc.py

Once you run the script, open report_h4.html in the browser and observe the behaviour.

Impact
| Dimension | Assessment |
|------------------|-----------|
| Confidentiality | JavaScript execution; attacker can exfiltrate session cookies and any data accessible from the page's origin |
| Integrity | Arbitrary DOM manipulation, phishing form injection, forced redirects |
| Availability | Page crash or freeze available as secondary effect |

Risk context: TOC generation is a rendering step that often happens in a different template layer from the main body render, potentially reviewed separately and trusted implicitly. Vulnerabilities in TOC output are frequently overlooked in code review. Combined with H2, an attacker exploiting this via a single malicious heading simultaneously injects into both the heading element and the TOC anchor.

Sources & licences