CVE-2025-46654 Cross-site scripting in CodiMD
Attackers can bypass Content Security Policy protections in CodiMD by uploading HTML files referencing JavaScript, enabling cross-site scripting attacks.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-46654?
CVE-2025-46654 is a medium-severity cross-site scripting vulnerability in HackMD CodiMD, published on 26 Apr 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
CodiMD through 2.2.0 has a CSP-based protection mechanism against XSS through uploaded JavaScript content, but it can be bypassed by uploading a .html file that references an uploaded .js file.
Weakness: CWE-424
Which versions are affected by CVE-2025-46654?
It affects 1 product.
Products include Hackmd Codimd.
How do I fix CVE-2025-46654?
No fix has been published for CVE-2025-46654 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2025-46654 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46654 exists.
Other vulnerabilities in HackMD CodiMD
Sources
Also known as GHSA-4r7r-xfq3-2r3v.