Vulnerabilities/

defuddle vulnerable to XSS via unescaped string interpolation in _findContentBySchemaText image tag

Severity:
Low

Description

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 handlers.

Recommendation

Update the defuddle package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
defuddle
Anything's wrong? Let us know Last updated on March 09, 2026