rustsec-2022-0003
Vulnerability from osv_rustsec
Published
2022-01-19 12:00
Modified
2023-06-13 13:10
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": [
{
"database_specific": {
"categories": [
"format-injection"
],
"cvss": null,
"informational": null
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [],
"functions": [
"ammonia::clean_text"
],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "ammonia",
"purl": "pkg:cargo/ammonia"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.1.3"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [
"GHSA-p2g9-94wh-65c2"
],
"database_specific": {
"license": "CC0-1.0"
},
"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.",
"id": "RUSTSEC-2022-0003",
"modified": "2023-06-13T13:10:24Z",
"published": "2022-01-19T12:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/ammonia"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2022-0003.html"
},
{
"type": "WEB",
"url": "https://github.com/rust-ammonia/ammonia/pull/147"
}
],
"related": [],
"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…