GHSA-p2g9-94wh-65c2

Suggest an improvement
Source
https://github.com/advisories/GHSA-p2g9-94wh-65c2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-p2g9-94wh-65c2/GHSA-p2g9-94wh-65c2.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-p2g9-94wh-65c2
Aliases
Published
2022-06-16T23:39:55Z
Modified
2023-11-08T04:21:23.389784Z
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.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-79"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2022-06-16T23:39:55Z"
}
References

Affected packages

crates.io / ammonia

Package

Affected ranges

Type
SEMVER
Events
Introduced
3.0.0
Fixed
3.1.3