GHSA-p2g9-94wh-65c2 Space bug in `clean_text`
Unknown
- Published
- Updated
- Exploit status
- No public exploit known
Description
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.
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| crates.io ammonia(crates.io) | >= 3.0.0, < 3.1.3 | 3.1.3 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| crates.io ammonia(crates.io) | >= 3.0.0, < 3.1.3 | 3.1.3 |
References
- github.com patch
- rustsec.org vendor-advisory
- github.com patch
- github.com
- github.com product
- crates.io product