Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-38193

An issue was discovered in the ammonia crate before 3.1.0 for Rust. XSS can occur because the parsing differences for HTML, SVG, and MathML are mishandled, a similar issue to CVE-2020-26870.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-38193
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 08:14 UTC · Revision 1

Source evidence

CVE-2021-38193

core-osv · Original source

Published 8 Aug 2021, 06:15 UTC

An issue was discovered in the ammonia crate before 3.1.0 for Rust. XSS can occur because the parsing differences for HTML, SVG, and MathML are mishandled, a similar issue to CVE-2020-26870.

osv:CVE-2021-38193
Complete source record
{
  "id": "950bcd96e656beb163a2beea43bb10e9a635e8cfc47c0faa645c546de26e230d",
  "url": "https://osv.dev/vulnerability/CVE-2021-38193",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-38193",
    "summary": "An issue was discovered in the ammonia crate before 3.1.0 for Rust. XSS can occur because the parsing differences for HTML, SVG, and MathML are mishandled, a similar issue to CVE-2020-26870.",
    "evidence": "osv:CVE-2021-38193",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-38193",
      "aliases": [
        "CVE-2021-38193",
        "GHSA-5325-xw5m-phm3",
        "RUSTSEC-2021-0074"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/rust-ammonia/ammonia",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "892da8a7f16b7af34c95394b98b5d0ca974ae9cd"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:ammonia_project:ammonia:*:*:*:*:*:rust:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.1.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.1.3",
            "v2.1.2",
            "v3.0.0",
            "v2.1.1",
            "v2.1.0",
            "v2.0.0",
            "v1.2.0",
            "v1.1.0",
            "v1.0.1",
            "v1.0.0",
            "v1.0.0-rc3",
            "v1.0.0-rc2",
            "v1.0.0-rc1",
            "v0.7.0",
            "v0.6.0",
            "v0.5.0",
            "v0.4.0",
            "v0.2.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-38193.json"
          }
        }
      ],
      "modified": "2026-10-24T10:31:04.737812030Z",
      "provider": "osv",
      "references": [
        "https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/ammonia/RUSTSEC-2021-0074.md",
        "https://rustsec.org/advisories/RUSTSEC-2021-0074.html"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-38193",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 440590,
  "published_at": "2021-08-08T06:15:09.043+00:00"
}