Security mailing lists by PureSourceCode

GHSA-p2g9-94wh-65c2

MEDIUM

Space bug in `clean_text`

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.

Published
19 Jan 2022
Last modified
8 Nov 2023
Weakness
CWE-79
Also known as
RUSTSEC-2022-0003
Sources
OSVJSONOSV RUSTSEC-2022-0003JSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io ammonia >= 3.0.0, < 3.1.3 3.1.3

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 19 Jan 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 16 Jun 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.