CVE-2024-24785

MEDIUM5.4EPSS 0.92%

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

Published: 3/5/2024Modified: 4/28/2026

Description

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.

Affected packages (4)

CVSS scores

SourceVersionSeverityVector
osvCVSS 3.1MEDIUM5.4CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

References (8)