Skip to content
Fencer Vulns
medium 5.4

CVE-2024-24785 json

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

published 2024-03-05 2 y ago modified 2026-06-17 4 mo ago also BIT-golang-2024-24785 , EUVD-2024-22163 , GO-2024-2610

cvss
5.4
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.8%
EPSS 0.8% chance of exploitation in 30 days, percentile 56%
public exploits
0
none known

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.

Patch / fix

  • bitnami golang 1.21.8, 1.22.1
  • go stdlib 1.21.8, 1.22.1
  • Go standard library html/template 1.21.8, 1.22.1
  • golang-1.17 Ubuntu 22.04 LTS 1.17.13-3ubuntu1.2
  • golang-1.18 Ubuntu 20.04 LTS 1.18.1-1ubuntu1~20.04.3
  • golang-1.18 Ubuntu 22.04 LTS 1.18.1-1ubuntu1.2
  • golang-1.21 Ubuntu 20.04 LTS 1.21.1-1~ubuntu20.04.3
  • golang-1.21 Ubuntu 22.04 LTS 1.21.1-1~ubuntu22.04.3
  • golang-1.18 Ubuntu Pro 16.04 LTS 1.18.1-1ubuntu1~16.04.6+esm1
  • golang-1.18 Ubuntu Pro 18.04 LTS 1.18.1-1ubuntu1~18.04.4+esm1

ubuntu advisories UBUNTU-CVE-2024-24785

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • crit RHEL 8 3.18-5.module+el8.10.0+23963+b64d8032
  • criu RHEL 8 3.18-5.module+el8.10.0+23963+b64d8032
  • crun RHEL 8 1.14.3-2.module+el8.10.0+23963+b64d8032
  • runc RHEL 8 4:1.2.9-3.module+el8.10.0+23963+b64d8032
  • udica RHEL 8 0.2.6-21.module+el8.10.0+23963+b64d8032
  • conmon RHEL 8 3:2.1.10-1.module+el8.10.0+23963+b64d8032
  • podman RHEL 8 4:4.9.4-28.module+el8.10.0+23963+b64d8032
  • skopeo RHEL 8 2:1.14.5-6.module+el8.10.0+23963+b64d8032

red hat advisories RHSA-2026:3428RHSA-2024:9135RHSA-2024:3259RHSA-2024:4893RHSA-2024:4023RHSA-2024:0045

  • go1.22-openssl SLE Module for Development Tools 15 SP6, openSUSE Leap 15.6 1.22.7.1-150600.13.3.1
  • go1.22-openssl SLE Module for Development Tools 15 SP5, openSUSE Leap 15.5 1.22.7.1-150000.1.3.1
  • go1.21-openssl SLE Module for Development Tools 15 SP6, openSUSE Leap 15.6 1.21.13.1-150600.16.3.1
  • go1.21-openssl SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Module for Development Tools 15 SP5 +3 more 1.21.13.1-150000.1.11.1
  • go1.22 SLE Software Development Kit 12 SP5 1.22.1-1.3.1
  • go1.22 SLE Module for Development Tools 15 SP5, openSUSE Leap 15.5 1.22.1-150000.1.9.1
  • go1.21 SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Module for Development Tools 15 SP5 +3 more 1.21.8-150000.1.27.1
  • go1.21 SLE Software Development Kit 12 SP5 1.21.8-1.27.1

suse advisories SUSE-SU-2024:3938-1SUSE-SU-2024:3772-1SUSE-SU-2024:3755-1SUSE-SU-2024:3089-1SUSE-SU-2024:0936-1SUSE-SU-2024:0812-1

  • go1.22 openSUSE Tumbleweed 1.22.1-1.1
  • go1.21 openSUSE Tumbleweed 1.21.8-1.1

opensuse advisories openSUSE-SU-2024:13752-1openSUSE-SU-2024:13756-1

  • crit AlmaLinux 8 3.18-5.module_el8.10.0+4047+545787c4
  • crit AlmaLinux 8 3.18-5.module_el8.10.0+3901+4b80ecd7
  • crit AlmaLinux 8 3.18-5.module_el8.10.0+4120+03ad4b47
  • crit AlmaLinux 8 3.18-5.module_el8.10.0+3845+87b84552
  • criu AlmaLinux 8 3.18-5.module_el8.10.0+4089+ce72bbbe
  • criu AlmaLinux 8 3.18-5.module_el8.10.0+4120+03ad4b47
  • criu AlmaLinux 8 3.18-5.module_el8.10.0+3876+e55593a8
  • criu AlmaLinux 8 3.18-5.module_el8.10.0+3909+6e1c1eb7

almalinux advisories ALSA-2026:3428ALSA-2024:9135ALSA-2024:3259ALSA-2024:2562

  • criu Rocky Linux 8 3.18-5.module+el8.10.0+2001+6a33db9f
  • criu Rocky Linux 8 3.18-5.module+el8.10.0+40047+0c0a73f4
  • criu Rocky Linux 8 3.18-5.module+el8.10.0+1948+4b5cd4a9
  • criu Rocky Linux 8 3.18-5.module+el8.10.0+1874+ce489889
  • criu Rocky Linux 8 3.18-5.module+el8.10.0+1815+5fe7415e
  • criu Rocky Linux 8 3.18-5.module+el8.10.0+1880+8e896d1b
  • criu Rocky Linux 8 3.18-5.module+el8.10.0+1872+2e18eb19
  • criu Rocky Linux 8 3.18-5.module+el8.10.0+1825+623b0c20

rocky linux advisories RLSA-2026:3428RLSA-2024:9135RLSA-2024:3259RLSA-2024:2562

  • go Alpine 3.19 1.21.8-r0
  • go Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 1.22.1-r0

alpine advisories ALPINE-CVE-2024-24785

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • golang CBL-Mariner 2.0 1.21.6-1

azure linux advisories AZL-37457AZL-37460

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-24785 updated cvss 6.5

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

  • Red Hat Cost Management Metrics Operator costmanagement/costmanagement-metrics-rhel8-operator
    affected: workaround, no fix available
  • Red Hat Migration Toolkit for Applications 6 mta/mta-hub-rhel8 Red Hat Multicluster Engine for Kubernetes multicluster-engine/hive-rhel8 Red Hat Node Maintenance Operator workload-availability/node-maintenance-rhel8-operator
    affected: workaround, no fix planned “Will not fix”
  • Red Hat OpenShift Developer Tools and Services helm, ocp-tools-4/jenkins-rhel8
    affected: workaround, no fix available, no fix planned “Will not fix”
  • Red Hat OpenShift Pipelines openshift-pipelines-client Red Hat 3scale API Management Platform 2 3scale-amp26/3scale-operator Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/subctl-rhel9
    affected: workaround, no fix available
  • Red Hat Advanced Cluster Security 3 advanced-cluster-security/rhacs-main-rhel8
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Advanced Cluster Security 4 advanced-cluster-security/rhacs-main-rhel8
    affected: workaround, no fix available
  • Red Hat Ansible Automation Platform 2 aap-cloud-ui-container
    affected: workaround, no fix planned “Will not fix”
  • Red Hat Ceph Storage 5 rhceph/rhceph-5-dashboard-rhel8
    affected: workaround, no fix planned “Out of support scope”
show 20 more
  • Red Hat Ceph Storage 6 rhceph/rhceph-6-dashboard-rhel9
    affected: workaround, no fix planned “Will not fix”
  • Red Hat Ceph Storage 7 rhceph/grafana-rhel9
    affected: workaround, no fix available
  • Red Hat Certification for Red Hat Enterprise Linux 8 redhat-certification-preflight Red Hat Certification Program for Red Hat Enterprise Linux 9 redhat-certification-preflight
    affected: workaround, no fix planned “Will not fix”
  • Red Hat Enterprise Linux 8 grafana, toolbox, grafana-loki, grafana-mssql, grafana-mysql, toolbox-tests, +14 more Red Hat Enterprise Linux 9 grafana, ignition, ignition-edge, ignition-grub, grafana-selinux, osbuild-composer, +4 more
    affected: workaround, no fix available, no fix planned “Will not fix”
  • Red Hat OpenShift Dev Spaces devspaces/udi-rhel8 Red Hat OpenShift distributed tracing 2 rhosdt/tempo-rhel8 Red Hat OpenShift GitOps openshift-gitops-1/gitops-rhel8
    affected: workaround, no fix available
  • Red Hat OpenShift on AWS rosa
    affected: workaround, no fix planned “Will not fix”
  • Red Hat Openshift Sandboxed Containers openshift-sandboxed-containers/osc-rhel8-operator Red Hat OpenShift Virtualization 4 kubevirt
    affected: workaround, no fix available
  • Red Hat OpenStack Platform 16.2 etcd Red Hat OpenStack Platform 17.1 etcd Red Hat OpenStack Platform 18.0 etcd
    affected: workaround, no fix planned “Will not fix”
  • Red Hat Quay 3 quay/clair-rhel8 Red Hat Service Interconnect 1 skupper-cli
    affected: workaround, no fix available
  • Red Hat Storage 3 golang, golang-bin, golang-src, golang-misc, golang-tests
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Self Node Remediation Operator workload-availability/self-node-remediation-rhel8-operator
    affected: workaround, no fix available
  • Red Hat Builds for Red Hat OpenShift
    fixed: vendor fix RHSA-2024:6221
  • Red Hat Builds for Red Hat OpenShift 1.1.1 openshift-builds
    fixed: vendor fix RHSA-2024:5013
  • Red Hat KDO 5.0 for RHEL 9 kube-descheduler-operator/descheduler-rhel9 v5.0-31, kube-descheduler-operator/kube-descheduler-rhel9-operator v5.0-28, kube-descheduler-operator/kube-descheduler-operator-bundle v5.0-23
    fixed: vendor fix RHSA-2024:3617
  • Red Hat Migration Toolkit for Virtualization 2.6 migration-toolkit-virtualization/mtv-api-rhel9 2.6.2-9, migration-toolkit-virtualization/mtv-virt-v2v-rhel9 2.6.2-9, migration-toolkit-virtualization/mtv-rhel8-operator 2.6.2-11, migration-toolkit-virtualization/mtv-controller-rhel9 2.6.2-9, migration-toolkit-virtualization/mtv-operator-bundle 2.6.2-26, migration-toolkit-virtualization/mtv-validation-rhel9 2.6.2-9, +7 more
    fixed: vendor fix RHBA-2024:3470
  • Red Hat NETOBSERV 1.6 for RHEL 9 network-observability/network-observability-cli-rhel9 v1.6.0-66, network-observability/network-observability-operator-bundle 1.6.0-78, network-observability/network-observability-rhel9-operator v1.6.0-66, network-observability/network-observability-ebpf-agent-rhel9 v1.6.0-66, network-observability/network-observability-console-plugin-rhel9 v1.6.0-66, network-observability/network-observability-flowlogs-pipeline-rhel9 v1.6.0-66
    fixed: vendor fix RHSA-2024:3868
  • Red Hat OpenShift API for Data Protection 1.3 oadp/oadp-velero-rhel9 1.3.2-9
    fixed: vendor fix RHSA-2024:3790
  • Red Hat OpenShift Custom Metrics Autoscaler 2 custom-metrics-autoscaler/custom-metrics-autoscaler-rhel8 2.12.1-394, custom-metrics-autoscaler/custom-metrics-autoscaler-adapter-rhel8 2.12.1-394, custom-metrics-autoscaler/custom-metrics-autoscaler-rhel8-operator 2.12.1-394, custom-metrics-autoscaler/custom-metrics-autoscaler-operator-bundle 2.12.1-394, custom-metrics-autoscaler/custom-metrics-autoscaler-admission-webhooks-rhel8 2.12.1-394
    fixed: vendor fix RHSA-2024:2901
  • Red Hat OSSO 1.3 for RHEL 9 openshift-secondary-scheduler-operator/secondary-scheduler-rhel9-operator v1.3-12, openshift-secondary-scheduler-operator/secondary-scheduler-operator-bundle v1.3-12
    fixed: vendor fix RHSA-2024:3637
  • Red Hat Ceph Storage 8.1 Tools rhceph/rhceph-8-rhel9 8-492, rhceph/grafana-rhel9 11.5.2-6, rhceph/keepalived-rhel9 2.2.8-65, rhceph/oauth2-proxy-rhel9 v7.6.0-27, rhceph/snmp-notifier-rhel9 1.2.1-115, rhceph/rhceph-haproxy-rhel9 2.4.22-67, +1 more
    fixed: vendor fix RHSA-2025:9776

12 more fixed, 14 more not affected in the full advisory

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

0.80% chance of exploitation in the next 30 days, higher than 56% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CISA ADP 3.1 5.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
CNA 3.1 5.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
OSV 3.1 5.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
bitnami golang
<1.21.8
>=1.22.0-0, <1.22.1
1.21.8
1.22.1
go stdlib
<1.21.8
>=1.22.0-0, <1.22.1
1.21.8
1.22.1

Affected products

  • Go standard library html/template

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.