Intel

AIKIDO-2026-316811

ammonia is vulnerable to Cross-Site Scripting (XSS)

GHSA-f2pc-rwv3-69mvPublished Oct 19, 2026
October 19, 2026

61

CVE Score

Medium

Cross-Site Scripting (XSS)

Are you affected? Scan for Free

TL;DR

Ammonia's SVG sanitizer only neutralizes attack relevant attributes on the animate and set elements, leaving animateTransform, animateMotion, and animateColor unfiltered. Applications that allow those additional animation elements let a sanitized SVG payload set an href attribute to a javascript: URI through one of the unfiltered tags. A user who clicks the resulting link runs the script embedded in the href, producing stored XSS. The patch adds the missing animation element names to the neutralized tag list.

How do I fix this?

Upgrade the ammonia library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you allow the animateTransform, animateMotion, or animateColor SVG elements.

Package

Versions

4.1.0 - 4.1.6

Fixed in 4.1.7

4.1.0 - 4.2.2

Fixed in 4.2.3

Background info

ammonia is vulnerable to Cross-Site Scripting (XSS) in versions 4.1.0 - 4.1.6 and 4.1.0 - 4.2.2.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea