Listen to this Post
How the CVE Works:
CodiMD up to version 2.2.0 implements Content Security Policy (CSP) to prevent XSS attacks via uploaded JavaScript files. However, an attacker can bypass this protection by uploading a malicious `.html` file that references an externally hosted `.js` file. When a victim accesses the uploaded HTML file, the embedded JavaScript executes in their browser, leading to arbitrary code execution, session hijacking, or data theft. The CSP fails to restrict inline scripts or unsafe dynamic loading in this scenario.
DailyCVE Form:
Platform: CodiMD
Version: ≤ 2.2.0
Vulnerability: XSS bypass
Severity: Critical
Date: 2025-06-16
Prediction: Patch by 2025-08-15
What Undercode Say:
Analytics:
grep -r "CSP" /var/www/codimd/ curl -X POST -F "[email protected]" http://target/upload
Exploit:
1. Upload `malicious.html` referencing `evil.js`.
2. Trick user into visiting the HTML file.
3. JS payload executes in victim’s context.
Protection from this CVE:
- Disable HTML uploads.
- Enforce strict CSP directives.
- Update to patched version post-release.
Impact:
- Session hijacking
- Data exfiltration
- Privilege escalation
Sources:
Reported By: nvd.nist.gov
Extra Source Hub:
Undercode