Intel

AIKIDO-2026-590984

ammonia is vulnerable to CSS Injection

GHSA-69v2-w9vg-4g83Published Oct 19, 2026
October 19, 2026

54

CVE Score

Medium

CSS Injection

Are you affected? Scan for Free

TL;DR

Ammonia's CSS sanitizer serializes a rewritten url() value by concatenating it directly between literal quote characters instead of escaping the content. Applications that allow the style attribute and enable filter_style_properties can be exposed when a permitted URL scheme (for example cid:) carries an embedded quote in a sanitized value. The embedded quote breaks out of the intended url("...") token and lets untrusted CSS declarations run in the sanitized output. The patch serializes the URL through a CSS QuotedString encoder, escaping embedded quotes.

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 style attribute with filter_style_properties enabled.

Package

Versions

4.1.0 - 4.1.6

Fixed in 4.1.7

4.2.0 - 4.2.2

Fixed in 4.2.3

Background info

ammonia is vulnerable to CSS Injection in versions 4.1.0 - 4.1.6 and 4.2.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