GO-2024-2610

Source
https://pkg.go.dev/vuln/GO-2024-2610
Import Source
https://vuln.go.dev/ID/GO-2024-2610.json
Aliases
Published
2024-03-05T22:15:40Z
Modified
2024-03-12T09:11:35.678476Z
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.

References

Affected packages

Go / stdlib

Package

Name
stdlib

Affected ranges

Type
SEMVER
Events
Introduced
0The exact introduced commit is unknown
Fixed
1.21.8
Introduced
1.22.0-0
Fixed
1.22.1

Ecosystem specific

{
    "imports": [
        {
            "path": "html/template",
            "symbols": [
                "Template.Execute",
                "Template.ExecuteTemplate",
                "escaper.commit",
                "jsValEscaper"
            ]
        }
    ]
}