Skip to content
Heist/ feed
Back to feed
Medium

rust-ammonia — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-102342

ammonia is a Rust library for repairing and securing untrusted HTML. Prior to 3.3.3, 4.0.3, and 4.1.4, applications that allow the SVG animate or set elements can retain an animation whose attributeName targets href and whose value uses the javascript scheme. The sanitized SVG can therefore create a script-bearing link, and a user who clicks the link can execute attacker-controlled script in the application's origin, enabling stored cross-site scripting. This issue is fixed in versions 3.3.3, 4.0.3, and 4.1.4.

Products
rust-ammonia
Affected versions
3.1.0-2, 3.1.2-1, 3.2.1-1, 3.3.0-1, 4.0.0-3, 4.1.2-1, 4.1.4-1
Fixed versions
Not specified
CVEs
CVE-2026-102342
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:53 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-102342

core-osv · Original source

Published 13 Oct 2026, 15:17 UTC

ammonia is a Rust library for repairing and securing untrusted HTML. Prior to 3.3.3, 4.0.3, and 4.1.4, applications that allow the SVG animate or set elements can retain an animation whose attributeName targets href and whose value uses the javascript scheme. The sanitized SVG can therefore create a script-bearing link, and a user who clicks the link can execute attacker-controlled script in the application's origin, enabling stored cross-site scripting. This issue is fixed in versions 3.3.3, 4.0.3, and 4.1.4.

osv:UBUNTU-CVE-2026-102342

rust-ammonia

Fixed versions: Not specified

rust-ammonia

Fixed versions: Not specified

rust-ammonia

Fixed versions: Not specified

rust-ammonia

Fixed versions: Not specified

Complete source record
{
  "id": "15c8409452a2cba8caca6ef85880575ae8483befd1098c385ca34d3ac1f49ee8",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-102342",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-102342",
    "summary": "ammonia is a Rust library for repairing and securing untrusted HTML. Prior to 3.3.3, 4.0.3, and 4.1.4, applications that allow the SVG animate or set elements can retain an animation whose attributeName targets href and whose value uses the javascript scheme. The sanitized SVG can therefore create a script-bearing link, and a user who clicks the link can execute attacker-controlled script in the application's origin, enabling stored cross-site scripting. This issue is fixed in versions 3.3.3, 4.0.3, and 4.1.4.",
    "evidence": "osv:UBUNTU-CVE-2026-102342",
    "products": [
      {
        "name": {
          "value": "rust-ammonia",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.1.0-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.1.2-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "rust-ammonia",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.2.1-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "3.3.0-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "rust-ammonia",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.1.2-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.1.4-1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "rust-ammonia",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.0.0-3",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "4.1.2-1",
            "evidence": "/affected/3/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "UBUNTU-CVE-2026-102342",
      "aliases": [
        "UBUNTU-CVE-2026-102342"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "rust-ammonia",
            "purl": "pkg:deb/ubuntu/rust-ammonia?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "3.1.0-2",
            "3.1.2-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102342.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "librust-ammonia-dev",
                "binary_version": "3.1.2-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "rust-ammonia",
            "purl": "pkg:deb/ubuntu/rust-ammonia?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "3.2.1-1",
            "3.3.0-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102342.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "librust-ammonia-dev",
                "binary_version": "3.3.0-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "rust-ammonia",
            "purl": "pkg:deb/ubuntu/rust-ammonia?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "4.1.2-1",
            "4.1.4-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102342.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "librust-ammonia-dev",
                "binary_version": "4.1.4-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "rust-ammonia",
            "purl": "pkg:deb/ubuntu/rust-ammonia?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "4.0.0-3",
            "4.1.2-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-102342.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "librust-ammonia-dev",
                "binary_version": "4.1.2-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:59:44.028170972Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-102342"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-102342",
        "https://www.cve.org/CVERecord?id=CVE-2026-102342",
        "https://github.com/rust-ammonia/ammonia/commit/9394bd81179e756cb911314deabd943f1a9c8989",
        "https://github.com/rust-ammonia/ammonia/commit/9e3335e2dd8ab07346ff7997f20662a3da4023f6",
        "https://github.com/rust-ammonia/ammonia/commit/d2ae1547f478bd84d158bc5e57f5d31437dc4d8d",
        "https://github.com/rust-ammonia/ammonia/pull/250",
        "https://github.com/rust-ammonia/ammonia/pull/251",
        "https://github.com/rust-ammonia/ammonia/pull/252",
        "https://github.com/rust-ammonia/ammonia/releases/tag/v3.3.3",
        "https://github.com/rust-ammonia/ammonia/releases/tag/v4.0.3",
        "https://github.com/rust-ammonia/ammonia/releases/tag/v4.1.4",
        "https://github.com/rust-ammonia/ammonia/security/advisories/GHSA-m6mh-2hw2-555x"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-102342",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 359739,
  "published_at": "2026-10-13T15:17:00+00:00"
}