Reflected cross-site scripting (XSS) In wwbn/avideo
Description
WWBN AVideo has an incomplete fix for CVE-2026-33500: XSS
Summary
The incomplete XSS fix in AVideo's ParsedownSafeWithLinks class overrides inlineMarkup for raw HTML but does not override inlineLink() or inlineUrlTag(), allowing javascript: URLs in markdown link syntax to bypass sanitization.
Affected Package
Ecosystem: Other
Package: AVideo
Affected versions: < commit 3ae02fa24093
Patched versions: >= commit 3ae02fa24093
Details
In objects/functionsSecurity.php, the ParsedownSafeWithLinks class:
Overrides blockMarkup() -- blocks non-<a>/<img> HTML tags
Overrides inlineMarkup() -- sanitizes <a href=...> and <img src=...> in raw HTML, including an href whitelist
But the base Parsedown.php class has two additional methods that generate <a> tags:
inlineLink() (line ~1388) -- processes [text](url) markdown syntax, sets href = URL directly
inlineUrlTag() (line ~1558) -- processes <URL> auto-link syntax, sets href = URL directly
Neither is overridden by ParsedownSafeWithLinks, so [Click me](javascript:alert(document.cookie)) produces <a href="javascript:alert(document.cookie)">Click me</a> without any sanitization.
The fix sanitizes raw HTML <a> tags via inlineMarkup but misses the markdown-native link syntax ([text](url)) and auto-link syntax (<url>) which produce <a> tags through different code paths in the base Parsedown class.
PoC
""" CVE-2026-33500 - Incomplete XSS fix in AVideo ParsedownSafeWithLinks Tests REAL vulnerable code from: objects/functionsSecurity.php (commit f154167, pre-fix 3ae02fa) vendor/erusev/parsedown/Parsedown.php The ParsedownSafeWithLinks class overrides:...
Steps to reproduce:
git clone https://github.com/WWBN/AVideo /tmp/AVideo_test
cd /tmp/AVideo_test && git checkout 3ae02fa240939dbefc5949d64f05790fd25d728d~1
python3 poc.py
Expected output:
VULNERABILITY CONFIRMED javascript: URLs in markdown [text](url) link syntax bypass sanitization since inlineLink() is not overridden.
Impact
An attacker can inject javascript: URLs via markdown link syntax in any user-generated content field that uses ParsedownSafeWithLinks (comments, descriptions, etc.). When another user clicks the rendered link, the attacker's JavaScript executes in their browser session, enabling session hijacking, account takeover, and data theft.
Suggested Remediation
Override inlineLink() and inlineUrlTag() in ParsedownSafeWithLinks to apply the same href protocol whitelist (https?://, mailto:, /, #) that inlineMarkup already applies to raw HTML <a> tags. Reject any href that does not match the whitelist.
Mitigation
Update Impact
Minimal update. May introduce new vulnerabilities or breaking changes.
Ecosystem | Package | Affected version |
|---|---|---|
packagist |
Aliases
References