Vulnerabilities

Vulnerability · RUSTSEC-2021-0158

XSS in ammonia via SVG , , and/or tags

Published Oct 10, 2021 · catalog updated Oct 13, 2026 · RustSec Rust

Open the advisory

Exploitation likelihood is not on this record for RUSTSEC-2021-0158. A missing EPSS score is not a low risk. Compare RustSec Rust with the linked advisory before you change production.

Gaps on this record

  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
  • EPSS is missing. A missing score is not a low risk.
Severity
Unknown—
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
Awaiting synchronization with FIRST
Remediation
Advisory link
Affected products
crates.io ammonia

The neutralization that ammonia applied to and was not applied to other forms of SVG animation, which can be used for XSS. The following SVG will produce a link with a javascript scheme. If the user clicks this link, they will run it. Ammonia did not apply attribute filters based on , so the contents of the , , and tags were not sanitized as URLs. Applications that do not explicitly allow any of these tags should not be affected, since none are allowed by default. --- This vulnerability was reported by [ucsurf](https://uc.surf).

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • crates.io ammonia0.0.0-0 → 4.1.7

How to fix RUSTSEC-2021-0158

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

Exploitation likelihood is not on this record for RUSTSEC-2021-0158. A missing EPSS score is not a low risk. Compare RustSec Rust with the linked advisory before you change production.

Which versions are affected?

Compare what you have installed with 0.0.0-0 → 4.1.7. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

No weakness class is stored. EPSS is not on this record yet. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 10, 2021 · Catalog

    Detected

    The neutralization that ammonia applied to and was not applied to other forms of SVG animation, which can be used for XSS. The following SVG will produce a link with a javascript scheme. If the user clicks this link, they will run it. Ammonia did not apply attribute filters based on , so the contents of the , , and tags were not sanitized as URLs. Applications that do not explicitly allow any of t

  2. Oct 13, 2026 · Catalog

    Fix available

    crates.io ammonia 0.0.0-0 → 4.1.7

  3. Oct 13, 2026 · Catalog

    Updated

    The neutralization that ammonia applied to and was not applied to other forms of SVG animation, which can be used for XSS. The following SVG will produce a link with a javascript scheme. If the user clicks this link, they will run it. Ammonia did not apply attribute filters based on , so the contents of the , , and tags were not sanitized as URLs. Applications that do not explicitly allow any of t

Sources

  • GitHub Advisory DatabasePackage advisoryGHSA-f2pc-rwv3-69mv

    GitHub Advisory Database record mirrored by OSV.

    github.com
  • OpenSSF OSV / OSV ScannerPackage advisoryRUSTSEC-2021-0158

    XSS in ammonia via SVG , , and/or tags

    osv.dev
  • RustSec Advisory DBVendor advisoryRUSTSEC-2021-0158

    The neutralization that ammonia applied to and was not applied to other forms of SVG animation, which can be used for XSS. The following SVG will produce a link with a javascript scheme. If the user clicks this link, they will run it. Ammonia did not apply attribute filters based

    crates.io

References

Freshness

Last verified in this catalog Oct 13, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.