GHSA-P2G9-94WH-65C2
Vulnerability from github – Published: 2022-06-16 23:39 – Updated: 2022-06-16 23:39
VLAI?
Summary
Space bug in `clean_text`
Details
An incorrect mapping from HTML specification to ASCII codes was used. Because HTML treats the Form Feed as whitespace, code like this has an injection bug:
let html = format!("<div title={}>", clean_text(user_supplied_string));
Applications are not affected if they quote their attributes, or if they don't use clean_text at all.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "ammonia"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.1.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2022-06-16T23:39:55Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "An incorrect mapping from HTML specification to ASCII codes was used.\nBecause HTML treats the Form Feed as whitespace, code like this has an injection bug:\n\n let html = format!(\"\u003cdiv title={}\u003e\", clean_text(user_supplied_string));\n\nApplications are not affected if they quote their attributes, or if they don\u0027t use `clean_text` at all.\n",
"id": "GHSA-p2g9-94wh-65c2",
"modified": "2022-06-16T23:39:55Z",
"published": "2022-06-16T23:39:55Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/rust-ammonia/ammonia/pull/147"
},
{
"type": "WEB",
"url": "https://github.com/rust-ammonia/ammonia/commit/6c7bf22907a75d1bbaed52e4f7dd9716f5e6f737"
},
{
"type": "PACKAGE",
"url": "https://github.com/rust-ammonia/ammonia"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2022-0003.html"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Space bug in `clean_text`"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…