Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2024-24785

golang: html/template: errors returned from MarshalJSON methods may break template escaping

Overview

Published
5 Mar 2024
Modified
17 Jun 2026
Medium CVE
2 Registry packages
411 OS packages
16 Linux distributions
Yes Fix available

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.

Source: OX vulnerability database

Severity

5.4 · MEDIUM

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Affected packages · 2

Packages affected by CVE-2024-24785
EcosystemPackageVulnerableFixed in
Bitnami golang <1.21.8>=1.22.0-0, <1.22.1 1.21.81.22.1
Go stdlib <1.21.8>=1.22.0-0, <1.22.1 1.21.81.22.1

Open a package to see all its vulnerabilities.

Operating systems · 750 fixes

Oracle Linux 2 releases · 21 packages

fixed 22
udica fuse-overlayfs crun oci-seccomp-bpf-hook slirp4netns delve +15
Oracle Linux fixes for CVE-2024-24785
ReleasePackageFixed in
8 udica 0.2.6-21.module+el8.10.0+90820+1c0b9746
8 fuse-overlayfs 1.13-1.module+el8.10.0+90820+1c0b9746
8 crun 1.14.3-2.module+el8.10.0+90820+1c0b9746
8 oci-seccomp-bpf-hook 1.2.10-1.module+el8.10.0+90820+1c0b9746
8 slirp4netns 1.2.3-1.module+el8.10.0+90820+1c0b9746
8 delve 1.21.2-3.0.1.module+el8.10.0+90307+cdf2b281

16 more rows

Photon OS 1 release · 1 package

fixed 1
go
Photon OS fixes for CVE-2024-24785
ReleasePackageFixed in
5.0 go 1.26.3-1.ph5

Red Hat 7 releases · 34 packages

eol 1 affected 1 fixed 46 wont fix 3
golang ignition rhc-worker-script etcd butane cri-tools +28
Red Hat fixes for CVE-2024-24785
ReleasePackageFixed inAdvisory
golang +5 eol —
7 ignition +3 affected —
7 rhc-worker-script 0:0.9-5.el7_9 RHSA-2024:4893
8 etcd +18 wont fix —
8 butane +1 0:0.21.0-1.rhaos4.16.el8 RHSA-2024:0045
8 cri-tools 0:1.29.0-3.1.el8 RHSA-2024:0045

45 more rows

SUSE Linux Enterprise 4 releases · 4 packages

fixed 10
go1-21 go1-22 go1-21-openssl go1-22-openssl
SUSE Linux Enterprise fixes for CVE-2024-24785
ReleasePackageFixed inAdvisory
12.5 go1-21 +1 1.21.8-1.27.1 SUSE-SU-2024:0800-1
12.5 go1-22 +1 1.22.1-1.3.1 SUSE-SU-2024:0936-1
15.4 go1-21-openssl +2 1.21.13.1-150000.1.11.1 SUSE-SU-2024:3089-1
15.4 go1-21 +2 1.21.8-150000.1.27.1 SUSE-SU-2024:0811-1
15.5 go1-21-openssl +2 1.21.13.1-150000.1.11.1 SUSE-SU-2024:3089-1
15.5 go1-21 +2 1.21.8-150000.1.27.1 SUSE-SU-2024:0811-1

4 more rows

alma 3 releases · 27 packages

fixed 29
toolbox udica fuse-overlayfs crun oci-seccomp-bpf-hook slirp4netns +21
alma fixes for CVE-2024-24785
ReleasePackageFixed in
8 (container-tools:rhel8) toolbox +1 0.0.99.5.1-1.module_el8.10.0+4120+03ad4b47
8 (container-tools:rhel8) udica 0.2.6-21.module_el8.10.0+4068+0e21408f
8 (container-tools:rhel8) fuse-overlayfs 1.13-1.module_el8.10.0+4068+0e21408f
8 (container-tools:rhel8) crun 1.14.3-2.module_el8.10.0+4120+03ad4b47
8 (container-tools:rhel8) oci-seccomp-bpf-hook 1.2.10-1.module_el8.10.0+4068+0e21408f
8 (container-tools:rhel8) slirp4netns 1.2.3-1.module_el8.10.0+4023+db236c53

23 more rows

alpine 4 releases · 1 package

fixed 4
go
alpine fixes for CVE-2024-24785
ReleasePackageFixed in
3.22 go 1.22.1-r0
3.23 go 1.22.1-r0
3.24 go 1.22.1-r0
edge go 1.22.1-r0

amazon linux 1 release · 1 package

fixed 1
golang
amazon linux fixes for CVE-2024-24785
ReleasePackageFixed in
2023 golang +6 1.22.3-1.amzn2023.0.1

chainguard 1 release · 275 packages

not affected 1 fixed 274
go-1-20 pombump stakater-reloader-0-0-119 stakater-reloader-0-0-128 yam gke-gcloud-auth-plugin +269
chainguard fixes for CVE-2024-24785
ReleasePackageFixed in
go-1-20 not affected
pombump 0.0.11-r1
stakater-reloader-0-0-119 0.0.119-r5
stakater-reloader-0-0-128 0.0.128-r4
yam 0.0.2-r1
gke-gcloud-auth-plugin 0.0.2-r7

269 more rows

debian 3 releases · 3 packages

affected 3
golang-1-11 golang-1-15 golang-1-19
debian fixes for CVE-2024-24785
ReleasePackageFixed in
10 golang-1-11 affected
11 golang-1-15 affected
12 golang-1-19 affected

echo 1 release · 1 package

affected 1
golang-1-19
echo fixes for CVE-2024-24785
ReleasePackageFixed in
golang-1-19 affected

minimos 1 release · 2 packages

fixed 2
solr-operator-0-8 trigger-dev
minimos fixes for CVE-2024-24785
ReleasePackageFixed in
solr-operator-0-8 0.8.1-r1
trigger-dev 4.5.11-r1

openSUSE 1 release · 2 packages

fixed 2
go1-21 go1-22
openSUSE fixes for CVE-2024-24785
ReleasePackageFixed inAdvisory
Tumbleweed go1-21 +3 1.21.8-1.1 openSUSE-SU-2024:13756-1
Tumbleweed go1-22 +3 1.22.1-1.1 openSUSE-SU-2024:13752-1

rocky 3 releases · 22 packages

fixed 137
toolbox udica fuse-overlayfs crun oci-seccomp-bpf-hook slirp4netns +16
rocky fixes for CVE-2024-24785
ReleasePackageFixed in
8 (container-tools:rhel8) toolbox +1 0.0.99.5.1-1.module+el8.10.0+40087+cfe9c127.rocky.0.2
8 (container-tools:rhel8) udica 0.2.6-21.module+el8.10.0+1815+5fe7415e
8 (container-tools:rhel8) udica 0.2.6-21.module+el8.10.0+1825+623b0c20
8 (container-tools:rhel8) udica 0.2.6-21.module+el8.10.0+1843+6892ab28
8 (container-tools:rhel8) udica 0.2.6-21.module+el8.10.0+1872+2e18eb19
8 (container-tools:rhel8) udica 0.2.6-21.module+el8.10.0+1874+ce489889

131 more rows

root.io debian 1 release · 1 package

affected 1
rootio-golang-1-19
root.io debian fixes for CVE-2024-24785
ReleasePackageFixed in
12 rootio-golang-1-19 affected

ubuntu 4 releases · 3 packages

fixed 8
golang-1-18 golang-1-21 golang-1-17
ubuntu fixes for CVE-2024-24785
ReleasePackageFixed in
18.04-ESM golang-1-18 1.18.1-1ubuntu1~18.04.4+esm1
20.04 golang-1-18 1.18.1-1ubuntu1~20.04.3
20.04 golang-1-21 1.21.1-1~ubuntu20.04.3
20.04-ESM golang-1-18 1.18.1-1ubuntu1~20.04.3
20.04-ESM golang-1-21 1.21.1-1~ubuntu20.04.3
22.04 golang-1-17 1.17.13-3ubuntu1.2

2 more rows

wolfi 1 release · 203 packages

not affected 1 fixed 202
go-1-20 pombump yam gke-gcloud-auth-plugin wireguard-go local-path-provisioner +197
wolfi fixes for CVE-2024-24785
ReleasePackageFixed in
go-1-20 not affected
pombump 0.0.11-r1
yam 0.0.2-r1
gke-gcloud-auth-plugin 0.0.2-r7
wireguard-go 0.0.20230223-r8
local-path-provisioner 0.0.26-r3

197 more rows

References

Show all 33 references

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.