Skip to main content
← All vulnerabilities
CVE-2024-24785GO-2024-2610BIT-GOLANG-2024-24785

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.21.8, 1.22.1
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • html/template

    fixed in 1.21.8; From 1.22.0-0 · fixed in 1.22.1

  • stdlibGo

    fixed in 1.21.8; From 1.22.0-0 · fixed in 1.22.1

References 6

go.dev

groups.google.com

pkg.go.dev

security.netapp.com

openwall.com