CVE-2026-30830 Defuddle: XSS via unescaped string interpolation in _findContentBySchemaText image tag
An attacker can inject malicious scripts via unescaped image attributes in Defuddle, potentially executing code in the context of the application using the library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-30830?
CVE-2026-30830 is a low-severity cross-site scripting vulnerability in kepano defuddle, published on 7 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Defuddle cleans up HTML pages. Prior to version 0.9.0, the _findContentBySchemaText method in src/defuddle.ts interpolates image src and alt attributes directly into an HTML string without escaping. An attacker can use a " in the alt attribute to break out of the attribute context and inject event handler. This issue has been patched in version 0.9.0.
Weakness: CWE-79
Which versions are affected by CVE-2026-30830?
2 open source packages ship an affected version, including defuddle. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
defuddle npm | All versions | 0.9.0 |
defuddle npm | All versions | 0.9.0 |
Products include Kepano Defuddle.
How do I fix CVE-2026-30830?
Upgrade defuddle to 0.9.0 or later.
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-2026-30830 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-30830 exists.
Sources
Also known as GHSA-5mq8-78gm-pjmq.