Advisory

GO-2022-0588

Also known as: CVE-2021-42576, GHSA-x95h-979x-cf3j, PYSEC-2021-849

Summary

Cross-site scripting via leaked style elements in github.com/microcosm-cc/bluemonday

Details

The bluemonday HTML sanitizer can leak the contents of a "style" element into HTML output, potentially causing XSS vulnerabilities.

The default bluemonday sanitization policies are not vulnerable. Only user-defined policies allowing "select", "style", and "option" elements are affected.

Permitting the "style" element in policies is hazardous, because bluemonday does not contain a CSS sanitizer. Newer versions of bluemonday suppress "style" and "script" elements even when allowed by a policy unless the policy explicitly requests unsafe processing.

Severity

Not rated by the source.

Dates

Published
2022-08-15 18:02 UTC
Modified
2024-05-20 16:03 UTC

Affected packages and fixes

github.com/microcosm-cc/bluemonday

Go · All systems

Affected

  • introduced 0, fixed 1.0.16 (semver)

Fixed versions

1.0.16

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences