# RUSTSEC-2021-0157 - Incorrect escaping for `url("")` functions in CSS style attributes

Source: https://junglewise.ai/threats/rustsec-2021-0157-incorrect-escaping-for-url-functions-in-css-style-b962567c  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-10-10  
License: CC BY 4.0 with a link back

Severity: info · Published 2021-10-10

Incorrect escaping for `url("")` functions in CSS style attributes

Technologies: [ammonia (crates.io)](https://junglewise.ai/threats/technologies/ammonia). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, published 10 October 2021.

**Which products and versions are affected?** ammonia (crates.io) SEMVER:introduced=0.0.0-0,fixed=4.1.7,introduced=4.2.0,fixed=4.2.3.

**Is there a fix for This vulnerability?** Yes. ammonia (crates.io): upgrade to 4.2.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected?** Check whether you run ammonia (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- ammonia (crates.io): upgrade to 4.2.3 or later

  ```sh
  cargo update -p ammonia
  ```


## Affected products

- ammonia (crates.io) SEMVER:introduced=0.0.0-0,fixed=4.1.7,introduced=4.2.0,fixed=4.2.3

## Identifiers

- GHSA-69v2-w9vg-4g83
- RUSTSEC-2021-0157

## Related threats

- [Rust Ammonia XSS via MathML annotation-xml encoding strip](https://junglewise.ai/threats/cve-2026-63430-rustsec-2026-0193-mxss-in-ammonia-via-mathml-annotation-xml)
- [ammonia CSS url function case-sensitivity bypass](https://junglewise.ai/threats/rustsec-2026-0373-missing-case-insensitive-matching-for-css-url-0b78f36f)
- [Ammonia cross-site scripting in SVG animate and set tags](https://junglewise.ai/threats/cve-2026-102342-ammonia-improper-neutralization-of-input-during-web-page)
- [RUSTSEC-2026-0213 - XSS in ammonia via SVG `animate` and `set` animation tags](https://junglewise.ai/threats/rustsec-2026-0213-xss-in-ammonia-via-svg-animate-and-set-animation-tags-3d7360b1)
- [Ammonia incorrectly handles embedded SVG and MathML leading to mutation XSS after removal](https://junglewise.ai/threats/ammonia-incorrectly-handles-embedded-svg-and-mathml-leading-to-mutation-c72e022f)
