cve.bz

CVE-2024-24785 go standard library html/template

5.4 mediumEPSS 0.8%Fix available

Medium (5.4) in go standard library html/template. EPSS 0.8% estimated probability of exploitation activity in the next 30 days. Fixed in stdlib 1.21.8, 1.22.1.

On this page
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.

Severity

CVSS 3.1

5.4 medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
EPSS
0.8% (unchanged from 0.8% a week ago; 0.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 57th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2024-03-06. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • stdlib (Go): fixed in 1.21.8, 1.22.1
  • Ubuntu, Red Hat, SUSE, openSUSE, AlmaLinux, Rocky Linux, Alpine, Azure Linux, Alpaquita, BellSoft Hardened Containers: fixed package versions per release

Ask an AI about this CVE

Show the promptExplain CVE-2024-24785 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-24785?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-24785?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-24785 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Go standard library html/templatebefore 1.21.8
Go standard library html/templatefrom 1.22.0-0 before 1.22.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GO-2024-2610Gostdlib<1.21.8
>=1.22.0-0 <1.22.1
1.21.8, 1.22.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12golang-1.19no fix listedDEBIAN-CVE-2024-24785
Ubuntu14.04:LTSgolang-1.10no fix listedUBUNTU-CVE-2024-24785
Ubuntu16.04:LTSgolang-1.6, golang-1.10no fix listedUBUNTU-CVE-2024-24785
Ubuntu18.04:LTSgolang-1.8, golang-1.9, golang-1.10no fix listedUBUNTU-CVE-2024-24785
Ubuntu20.04:LTSgolang-1.13, golang-1.14no fix listedUBUNTU-CVE-2024-24785
Ubuntu20.04:LTSgolang-1.181.18.1-1ubuntu1~20.04.3UBUNTU-CVE-2024-24785 USN-7109-1
Ubuntu20.04:LTSgolang-1.211.21.1-1~ubuntu20.04.3UBUNTU-CVE-2024-24785 USN-6886-1
Ubuntu22.04:LTSgolang-1.171.17.13-3ubuntu1.2UBUNTU-CVE-2024-24785 USN-7061-1
Ubuntu22.04:LTSgolang-1.181.18.1-1ubuntu1.2UBUNTU-CVE-2024-24785 USN-7109-1
Ubuntu22.04:LTSgolang-1.211.21.1-1~ubuntu22.04.3UBUNTU-CVE-2024-24785 USN-6886-1
Ubuntu22.04:LTSgolang-1.221.22.2-2~22.04.1USN-6886-1
Ubuntu24.04:LTSgolang-1.211.21.9-1ubuntu0.1USN-6886-1
Ubuntu24.04:LTSgolang-1.221.22.2-2ubuntu0.1USN-6886-1
5 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:8::appstreamaardvark-dns2:1.10.1-2.module+el8.10.0+23963+b64d8032RHSA-2026:3428
Red Hatenterprise_linux:8::appstreambuildah, buildah-tests, buildah-debuginfo and 2 more2:1.33.14-2.module+el8.10.0+23963+b64d8032RHSA-2026:3428
Red Hatenterprise_linux:8::appstreamcockpit-podman0:84.1-1.module+el8.10.0+23963+b64d8032RHSA-2026:3428
Red Hatenterprise_linux:8::appstreamconmon, conmon-debuginfo, conmon-debugsource3:2.1.10-1.module+el8.10.0+23963+b64d8032RHSA-2026:3428
Red Hatenterprise_linux:8::appstreamcontainer-selinux2:2.229.0-2.module+el8.10.0+23963+b64d8032RHSA-2026:3428
Red Hatenterprise_linux:8::appstreamcontainernetworking-plugins, containernetworking-plugins-debuginfo, containernetworking-plugins-debugsource1:1.4.0-7.module+el8.10.0+23963+b64d8032RHSA-2026:3428
Red Hatenterprise_linux:8::appstreamcontainers-common2:1-82.module+el8.10.0+23963+b64d8032RHSA-2026:3428
Red Hatenterprise_linux:8::appstreamcrit, criu, criu-libs and 5 more0:3.18-5.module+el8.10.0+23963+b64d8032RHSA-2026:3428
Red Hatenterprise_linux:8::appstreamcrun, crun-debuginfo, crun-debugsource0:1.14.3-2.module+el8.10.0+23963+b64d8032RHSA-2026:3428
Red Hatenterprise_linux:8::appstreamdelve, delve-debuginfo, delve-debugsource0:1.21.2-3.module+el8.10.0+21244+5b2d9000RHSA-2024:3259
Red Hatenterprise_linux:8::appstreamfuse-overlayfs, fuse-overlayfs-debuginfo, fuse-overlayfs-debugsource0:1.13-1.module+el8.10.0+23963+b64d8032RHSA-2026:3428
Red Hatenterprise_linux:8::appstreamgolang, go-toolset, golang-bin and 4 more0:1.21.9-1.module+el8.10.0+21671+b35c3b78RHSA-2024:3259
36 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Module for Development Tools 15 SP5 and 2 morego1.211.21.8-150000.1.27.1SUSE-SU-2024:0811-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Module for Development Tools 15 SP5 and 2 morego1.21-openssl1.21.13.1-150000.1.11.1SUSE-SU-2024:3089-1
SUSELinux Enterprise Module for Development Tools 15 SP5go1.221.22.1-150000.1.9.1SUSE-SU-2024:0812-1
SUSELinux Enterprise Module for Development Tools 15 SP5go1.22-openssl1.22.7.1-150000.1.3.1SUSE-SU-2024:3772-1
SUSELinux Enterprise Module for Development Tools 15 SP6go1.21-openssl1.21.13.1-150600.16.3.1SUSE-SU-2024:3755-1
SUSELinux Enterprise Module for Development Tools 15 SP6go1.22-openssl1.22.7.1-150600.13.3.1SUSE-SU-2024:3938-1
SUSELinux Enterprise Software Development Kit 12 SP5go1.211.21.8-1.27.1SUSE-SU-2024:0800-1
SUSELinux Enterprise Software Development Kit 12 SP5go1.221.22.1-1.3.1SUSE-SU-2024:0936-1
openSUSELeap 15.5go1.211.21.8-150000.1.27.1SUSE-SU-2024:0811-1
openSUSELeap 15.5go1.21-openssl1.21.13.1-150000.1.11.1SUSE-SU-2024:3089-1
openSUSELeap 15.5go1.221.22.1-150000.1.9.1SUSE-SU-2024:0812-1
openSUSELeap 15.5go1.22-openssl1.22.7.1-150000.1.3.1SUSE-SU-2024:3772-1
openSUSELeap 15.6go1.21-openssl1.21.13.1-150600.16.3.1SUSE-SU-2024:3755-1
openSUSELeap 15.6go1.22-openssl1.22.7.1-150600.13.3.1SUSE-SU-2024:3938-1
openSUSETumbleweedgo1.211.21.8-1.1openSUSE-SU-2024:13756-1
openSUSETumbleweedgo1.221.22.1-1.1openSUSE-SU-2024:13752-1
AlmaLinux8aardvark-dns2:1.10.1-2.module_el8.10.0+3901+4b80ecd7ALSA-2026:3428
AlmaLinux8aardvark-dns2:1.10.1-2.module_el8.10.0+3909+6e1c1eb7ALSA-2026:3428
AlmaLinux8aardvark-dns2:1.10.1-2.module_el8.10.0+4047+545787c4ALSA-2026:3428
AlmaLinux8aardvark-dns2:1.10.1-2.module_el8.10.0+4089+ce72bbbeALSA-2026:3428
AlmaLinux8buildah, buildah-tests2:1.33.14-2.module_el8.10.0+4120+03ad4b47ALSA-2026:3428
AlmaLinux8cockpit-podman84.1-1.module_el8.10.0+4102+6c76e544ALSA-2026:3428
AlmaLinux8conmon3:2.1.10-1.module_el8.10.0+3970+8445edf6ALSA-2026:3428
AlmaLinux8conmon3:2.1.10-1.module_el8.10.0+4068+0e21408fALSA-2026:3428
AlmaLinux8conmon3:2.1.10-1.module_el8.10.0+4090+91932338ALSA-2026:3428
AlmaLinux8container-selinux2:2.229.0-2.module_el8.10.0+4090+91932338ALSA-2026:3428
AlmaLinux8containernetworking-plugins1:1.4.0-7.module_el8.10.0+4120+03ad4b47ALSA-2026:3428
AlmaLinux8containers-common2:1-82.module_el8.10.0+3876+e55593a8ALSA-2026:3428
52 more for AlmaLinux in the JSON.
Rocky Linux8aardvark-dns2:1.10.1-2.module+el8.10.0+1874+ce489889RLSA-2026:3428
Rocky Linux8aardvark-dns2:1.10.1-2.module+el8.10.0+1880+8e896d1bRLSA-2026:3428
Rocky Linux8aardvark-dns2:1.10.1-2.module+el8.10.0+1896+b18fa106RLSA-2026:3428
Rocky Linux8aardvark-dns2:1.10.1-2.module+el8.10.0+1948+4b5cd4a9RLSA-2026:3428
Rocky Linux8aardvark-dns2:1.10.1-2.module+el8.10.0+2001+6a33db9fRLSA-2026:3428
Rocky Linux8aardvark-dns2:1.10.1-2.module+el8.10.0+40047+0c0a73f4RLSA-2026:3428
Rocky Linux8buildah2:1.33.14-2.module+el8.10.0+40087+cfe9c127RLSA-2026:3428
Rocky Linux8cockpit-podman0:84.1-1.module+el8.10.0+1815+5fe7415eRLSA-2026:3428
Rocky Linux8cockpit-podman0:84.1-1.module+el8.10.0+1825+623b0c20RLSA-2026:3428
Rocky Linux8cockpit-podman0:84.1-1.module+el8.10.0+1843+6892ab28RLSA-2026:3428
Rocky Linux8cockpit-podman0:84.1-1.module+el8.10.0+1872+2e18eb19RLSA-2026:3428
Rocky Linux8cockpit-podman0:84.1-1.module+el8.10.0+1874+ce489889RLSA-2026:3428
122 more for Rocky Linux in the JSON.
Alpinev3.19go1.21.8-r0ALPINE-CVE-2024-24785
Alpinev3.20, v3.21, v3.22 and 2 morego1.22.1-r0ALPINE-CVE-2024-24785
Azure Linux2golang1.21.6-1AZL-37457 AZL-37460
Azure Linux3golangno fix listedAZL-79024 AZL-98967
Alpaquita23go1.21.8-r0BELL-CVE-2024-24785
Alpaquitastreamgo1.22.1-r0BELL-CVE-2024-24785
BellSoft Hardened Containers23go1.21.8-r0BELL-CVE-2024-24785
BellSoft Hardened Containersstreamgo1.22.1-r0BELL-CVE-2024-24785

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Builds for Red Hat OpenShiftopenshift-builds-waiters-containerFixed 2024-09-03RHSA-2024:6221
KDO-5.0-RHEL-9kube-descheduler-operator/descheduler-rhel9:v5.0-31Fixed 2024-07-01RHSA-2024:3617
KDO-5.0-RHEL-9kube-descheduler-operator/kube-descheduler-operator-bundle:v5.0-23Fixed 2024-07-01RHSA-2024:3617
KDO-5.0-RHEL-9kube-descheduler-operator/kube-descheduler-rhel9-operator:v5.0-28Fixed 2024-07-01RHSA-2024:3617
Migration Toolkit for Virtualization 2.6migration-toolkit-virtualization/mtv-api-rhel9:2.6.2-9Fixed 2024-05-29RHBA-2024:3470
Migration Toolkit for Virtualization 2.6migration-toolkit-virtualization/mtv-console-plugin-rhel9:2.6.2-6Fixed 2024-05-29RHBA-2024:3470
Migration Toolkit for Virtualization 2.6migration-toolkit-virtualization/mtv-controller-rhel9:2.6.2-9Fixed 2024-05-29RHBA-2024:3470
Migration Toolkit for Virtualization 2.6migration-toolkit-virtualization/mtv-must-gather-rhel8:2.6.2-6Fixed 2024-05-29RHBA-2024:3470
Migration Toolkit for Virtualization 2.6migration-toolkit-virtualization/mtv-openstack-populator-rhel9:2.6.2-8Fixed 2024-05-29RHBA-2024:3470
Migration Toolkit for Virtualization 2.6migration-toolkit-virtualization/mtv-operator-bundle:2.6.2-26Fixed 2024-05-29RHBA-2024:3470
cert-manager Operator for Red Hat OpenShiftcert-manager/cert-manager-operator-rhel9Not affected
Cost Management Metrics Operatorcostmanagement-metrics-operator-containerAffected
Logical Volume Manager Storagelvms4/topolvm-rhel8Not affected
Migration Toolkit for Applications 6mta/mta-hub-rhel9Will not fix
Migration Toolkit for Applications 7mta/mta-cli-rhel9Not affected
Multicluster Engine for Kubernetesmulticluster-engine/hive-rhel8Will not fix
Node Maintenance Operatorworkload-availability/node-maintenance-rhel8-operatorWill not fix
OpenShift Developer Tools and ServiceshelmWill not fix
OpenShift Developer Tools and Servicesocp-tools-4/jenkins-rhel8Affected
OpenShift Pipelinesopenshift-pipelines-clientAffected
350 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-24785.

References

Check your stackJSON