Advisory

GO-2024-2610

Also known as: BIT-golang-2024-24785, CVE-2024-24785

Summary

Errors returned from JSON marshaling may break template escaping in html/template

Details

If errors returned from MarshalJSON methods contain user controlled data, they may be used to break the contextual auto-escaping behavior of the html/template package, allowing for subsequent actions to inject unexpected content into templates.

Severity

Not rated by the source.

Dates

Published
2024-03-05 22:15 UTC
Modified
2026-02-04 03:09 UTC

Affected packages and fixes

stdlib

Go · All systems

Affected

  • introduced 0, fixed 1.21.8, introduced 1.22.0-0, fixed 1.22.1 (semver)

Fixed versions

1.21.8, 1.22.1

Fix

The export has no generic command for this ecosystem.

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