{"answers":{"affected":"7 open source packages ship an affected version, including ammonia.","exploited":"There is no known exploitation of GHSA-mm7x-qfjj-5g2c in the wild and no public exploit code.","fix":"Upgrade ammonia to a fixed version for your release line: 3.3.1, 4.0.1 or 4.1.2.","what":"GHSA-mm7x-qfjj-5g2c is a cross-site scripting vulnerability in ammonia, published on 21 Sep 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-mm7x-qfjj-5g2c and fix it if it is affected.\n\nWhat it is: GHSA-mm7x-qfjj-5g2c is a cross-site scripting vulnerability in ammonia, published on 21 Sep 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-mm7x-qfjj-5g2c in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- ammonia (crates.io): affected all versions; fixed in 3.3.1\n- ammonia (crates.io): affected all versions; fixed in 3.3.1\n- ammonia (crates.io): affected from 0.0.0-0; fixed in 3.3.1, 4.0.1, 4.1.2\n- ammonia (crates.io): affected from 4.0.0; fixed in 4.0.1\n- ammonia (crates.io): affected from 4.0.0; fixed in 4.0.1\n- ammonia (crates.io): affected from 4.1.0; fixed in 4.1.2\n- ammonia (crates.io): affected from 4.1.0; fixed in 4.1.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-mm7x-qfjj-5g2c/ (Markdown: https://insights.sbomify.com/GHSA-mm7x-qfjj-5g2c/index.md)","id":"GHSA-mm7x-qfjj-5g2c","markdown":"https://insights.sbomify.com/GHSA-mm7x-qfjj-5g2c/index.md","name":"GHSA-mm7x-qfjj-5g2c","record":{"aliases":["RUSTSEC-2025-0071"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Rust HTML sanitizer","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript via mutation XSS if the application explicitly allows SVG, MathML, and specific raw-text HTML tags.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Affected versions of this crate did not correctly strip namespace-incompatible tags\nin certain situations, causing it to incorrectly account for differences between HTML,\nSVG, and MathML.\n\nThis vulnerability only has an effect when the `svg` or `math` tag is allowed,\nbecause it relies on a tag being parsed as html during the cleaning process, but\nserialized in a way that causes in to be parsed as xml by the browser.\n\nAdditionally, the application using this library must allow a tag that is parsed as raw text in HTML.\nThese [elements] are:\n\n* title\n* textarea\n* xmp\n* iframe\n* noembed\n* noframes\n* plaintext\n* noscript\n* style\n* script\n\nApplications that do not explicitly allow any of these tags should not be affected, since none are allowed by default.\n\n[elements]: https://github.com/servo/html5ever/blob/57eb334c0ffccc6f88d563419f0fbeef6ff5741c/html5ever/src/tree_builder/rules.rs","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Incorrect handling of embedded SVG and MathML leads to mutation XSS after removal","id":"GHSA-mm7x-qfjj-5g2c","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"xss","year":"2025"},"n_packages":7,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["3.3.1"],"introduced":["0"],"last_affected":[],"package":"ammonia","purl":null,"source":"GHSA-mm7x-qfjj-5g2c"},{"ecosystem":"crates.io","fixed":["3.3.1"],"introduced":["0"],"last_affected":[],"package":"ammonia","purl":"pkg:cargo/ammonia","source":"GHSA-mm7x-qfjj-5g2c"},{"ecosystem":"crates.io","fixed":["3.3.1","4.0.1","4.1.2"],"introduced":["0.0.0-0","4.0.0","4.1.0"],"last_affected":[],"package":"ammonia","purl":"pkg:cargo/ammonia","source":"RUSTSEC-2025-0071"},{"ecosystem":"crates.io","fixed":["4.0.1"],"introduced":["4.0.0"],"last_affected":[],"package":"ammonia","purl":null,"source":"GHSA-mm7x-qfjj-5g2c"},{"ecosystem":"crates.io","fixed":["4.0.1"],"introduced":["4.0.0"],"last_affected":[],"package":"ammonia","purl":"pkg:cargo/ammonia","source":"GHSA-mm7x-qfjj-5g2c"},{"ecosystem":"crates.io","fixed":["4.1.2"],"introduced":["4.1.0"],"last_affected":[],"package":"ammonia","purl":null,"source":"GHSA-mm7x-qfjj-5g2c"},{"ecosystem":"crates.io","fixed":["4.1.2"],"introduced":["4.1.0"],"last_affected":[],"package":"ammonia","purl":"pkg:cargo/ammonia","source":"GHSA-mm7x-qfjj-5g2c"}],"products":null,"published":"2025-09-21","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can execute arbitrary JavaScript via mutation XSS if the application explicitly allows SVG, MathML, and specific raw-text HTML tags.","url":"https://insights.sbomify.com/GHSA-mm7x-qfjj-5g2c/"}