Advisory

GO-2023-2043

Also known as: BIT-golang-2023-39319, CVE-2023-39319

Summary

Improper handling of special tags within script contexts in html/template

Details

The html/template package does not apply the proper rules for handling occurrences of "<script", "<!--", and "</script" within JS literals in <script> contexts. This may cause the template parser to improperly consider script contexts to be terminated early, causing actions to be improperly escaped. This could be leveraged to perform an XSS attack.

Severity

Not rated by the source.

Dates

Published
2023-09-07 16:11 UTC
Modified
2026-02-04 04:11 UTC

Affected packages and fixes

stdlib

Go · All systems

Affected

  • introduced 0, fixed 1.20.8, introduced 1.21.0-0, fixed 1.21.1 (semver)

Fixed versions

1.20.8, 1.21.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