Skip to content
Fencer Vulns
critical 9.8

CVE-2023-24540 json

Improper handling of JavaScript whitespace in html/template

published 2023-05-05 3 y ago modified 2026-09-08 2 mo ago also BIT-golang-2023-24540 , EUVD-2023-28556 , GO-2023-1752

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

Summary

Not all valid JavaScript whitespace characters are considered to be whitespace. Templates containing whitespace characters outside of the character set "\t\n\f\r\u0020\u2028\u2029" in JavaScript contexts that also contain actions may not be properly sanitized during execution.

Patch / fix

  • bitnami golang 1.19.9, 1.20.4
  • go stdlib 1.19.9, 1.20.4
  • Go standard library html/template 1.19.9, 1.20.4
  • crit RHEL 8 3.15-3.module+el8.9.0+19243+df4d9ff2
  • criu RHEL 8 3.15-3.module+el8.9.0+19243+df4d9ff2
  • crun RHEL 8 1.8.3-1.module+el8.9.0+19098+6e7a5e3f
  • runc RHEL 8 1:1.1.5-2.module+el8.9.0+19104+fcef53a3
  • udica RHEL 8 0.2.6-4.module+el8.9.0+19098+6e7a5e3f
  • conmon RHEL 8 2:2.1.4-2.module+el8.9.0+19098+6e7a5e3f
  • podman RHEL 8 2:4.0.2-24.module+el8.9.0+19784+443be299
  • skopeo RHEL 8 2:1.6.2-8.module+el8.9.0+19104+fcef53a3

red hat advisories RHSA-2023:6938RHSA-2023:6939RHSA-2023:3319RHSA-2023:6473RHSA-2023:6474RHSA-2023:6346

  • go1.19 SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Real Time 15 SP3 +5 more 1.19.9-150000.1.31.1
  • go1.20 SLE Real Time 15 SP3, SLE Module for Development Tools 15 SP4, openSUSE Leap 15.4 1.20.4-150000.1.11.1

suse advisories SUSE-SU-2023:2127-1SUSE-SU-2023:2105-2SUSE-SU-2023:2105-1

  • go1.19 openSUSE Tumbleweed 1.19.9-1.1
  • go1.20 openSUSE Tumbleweed 1.20.4-1.1

opensuse advisories openSUSE-SU-2024:12907-1openSUSE-SU-2024:12908-1

  • crit AlmaLinux 8 3.15-3.module_el8.6.0+3137+d33c3efb
  • crit AlmaLinux 8 3.15-3.module_el8.6.0+2877+8e437bf5
  • criu AlmaLinux 8 3.15-3.module_el8.6.0+2877+8e437bf5
  • criu AlmaLinux 8 3.15-3.module_el8.6.0+3137+d33c3efb
  • crun AlmaLinux 8 1.8.3-1.module_el8.9.0+3627+db8ec155
  • runc AlmaLinux 8 1:1.1.5-2.module_el8.9.0+3627+db8ec155
  • udica AlmaLinux 8 0.2.6-4.module_el8.9.0+3627+db8ec155
  • conmon AlmaLinux 8 2:2.1.4-2.module_el8.9.0+3627+db8ec155

almalinux advisories ALSA-2023:6938ALSA-2023:6939ALSA-2023:6346ALSA-2023:6363ALSA-2023:6402ALSA-2023:6473

  • criu Rocky Linux 8 3.15-3.module+el8.9.0+1445+07728297
  • crun Rocky Linux 8 1.8.3-1.module+el8.9.0+1445+07728297
  • runc Rocky Linux 8 1:1.1.5-2.module+el8.9.0+1445+07728297
  • udica Rocky Linux 8 0.2.6-4.module+el8.9.0+1445+07728297
  • conmon Rocky Linux 8 2:2.1.4-2.module+el8.9.0+1445+07728297
  • podman Rocky Linux 8 2:4.0.2-24.module+el8.9.0+1445+07728297
  • buildah Rocky Linux 8 1:1.24.6-7.module+el8.9.0+1445+07728297
  • libslirp Rocky Linux 8 4.4.0-1.module+el8.9.0+1445+07728297

rocky linux advisories RLSA-2023:6938RLSA-2023:6939RLSA-2023:3319

  • go Alpine 3.17 1.19.9-r0
  • go Alpine 3.24, Alpine 3.23, Alpine 3.22 +4 more 1.20.4-r0

alpine advisories ALPINE-CVE-2023-24540

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

  • msft-golang CBL-Mariner 2.0 1.20.11-1
  • golang CBL-Mariner 2.0 1.21.6-1

azure linux advisories AZL-26626AZL-37428AZL-37517

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-2023-24540 updated cvss 8.1

golang: html/template: improper handling of JavaScript whitespace

  • Red Hat Custom Metric Autoscaler operator for Red Hat Openshift custom-metrics-autoscaler/custom-metrics-autoscaler-rhel8 Red Hat Migration Toolkit for Virtualization migration-toolkit-virtualization/mtv-rhel8-operator Red Hat OpenShift Developer Tools and Services odo, helm Red Hat OpenShift Serverless openshift-serverless-1/kn-client-kn-rhel9 Red Hat 3scale API Management Platform 2 3scale-amp26/3scale-operator Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/thanos-rhel8
    +2 more products
    Red Hat AMQ Broker 7 ansible-automation-platform-24/controller-rhel8-operator Red Hat Ceph Storage 3 golang, golang-bin, golang-src
    affected: workaround, no fix available
  • Red Hat Enterprise Linux 8 skopeo, toolbox, skopeo-tests, toolbox-tests, osbuild-composer, containers-common, +4 more Red Hat Enterprise Linux 9 osbuild-composer, osbuild-composer-core, osbuild-composer-worker, osbuild-composer-dnf-json
    affected: workaround, no fix planned “Will not fix”
  • Red Hat Openshift Data Foundation 4 mcg Red Hat OpenShift Data Science (RHODS) rhods/odh-mm-rest-proxy-rhel8 Red Hat OpenShift Dev Spaces devspaces/udi-rhel8 Red Hat OpenShift distributed tracing 2 rhosdt/jaeger-agent-rhel8 Red Hat OpenShift GitOps openshift-gitops-kam Red Hat Openshift Sandboxed Containers openshift-sandboxed-containers/osc-rhel8-operator
    +4 more products
    Red Hat OpenShift Virtualization 4 openshift-golang-builder-container Red Hat Storage 3 golang, golang-bin, golang-src, golang-misc, golang-tests, go-toolset-7-golang Red Hat Web Terminal web-terminal-exec-container Red Hat Self Node Remediation Operator workload-availability/self-node-remediation-rhel8-operator
    affected: workaround, no fix available
  • Red Hat CNV 4.12 for RHEL 7 kubevirt 4.12.5-1189.el7, kubevirt-virtctl 4.12.5-1189.el7, kubevirt-virtctl-redistributable 4.12.5-1189.el7 Red Hat CNV 4.12 for RHEL 8 kubevirt 4.12.5-1189.el8, kubevirt-virtctl 4.12.5-1189.el8, kubevirt-virtctl-redistributable 4.12.5-1189.el8, container-native-virtualization/virt-api v4.12.5-11, container-native-virtualization/virtio-win v4.12.5-3, container-native-virtualization/kubemacpool v4.12.5-7, +40 more
    fixed: vendor fix RHSA-2023:4420
  • Red Hat CNV 4.13 for RHEL 9 container-native-virtualization/virt-api-rhel9 v4.13.3--2023-117063, container-native-virtualization/virtio-win-rhel9 v4.13.3--2023-117063, container-native-virtualization/kubemacpool-rhel9 v4.13.3--2023-117063, container-native-virtualization/multus-dynamic-networks-rhel9 v4.13.3-9, container-native-virtualization/virt-handler-rhel9 v4.13.3--2023-117063, container-native-virtualization/bridge-marker-rhel9 v4.13.3--2023-117063, +40 more
    fixed: vendor fix RHSA-2023:4664
  • Red Hat Middleware Containers for OpenShift amq7/amq-broker-rhel8-operator 7.12.0-16, amq7/amq-broker-rhel8-operator-bundle 7.12.0-10
    fixed: vendor fix RHSA-2024:2944
  • Red Hat MTA 6.2 for RHEL 8 mta/mta-hub-rhel9 6.2.0-16
    fixed: vendor fix RHSA-2023:4627
  • Red Hat NETOBSERV 1.3 for RHEL 9 network-observability/network-observability-rhel9-operator v1.3.0-53
    fixed: vendor fix RHSA-2023:3905
show 13 more
  • Red Hat OpenShift API for Data Protection 1.0 oadp/oadp-velero-rhel8 1.0.11-2
    fixed: vendor fix RHSA-2023:4289
  • Red Hat OpenShift API for Data Protection 1.1 oadp/oadp-velero-rhel8 1.1.5-3
    fixed: vendor fix RHSA-2023:3918
  • Red Hat Quay v3 quay/clair-rhel8 v3.8.11-3, quay/quay-rhel8 v3.8.11-13, quay/quay-builder-rhel8 v3.8.11-4, quay/quay-operator-rhel8 v3.8.11-3, quay/quay-operator-bundle v3.8.11-20, quay/quay-bridge-operator-rhel8 v3.8.11-3, +4 more
    fixed: vendor fix RHBA-2023:4275
  • Red Hat Ansible Automation Platform 2.3 for RHEL 8 openshift-clients 4.12.0-202307200611.p0.g49844f7.assembly.stream.el8
    fixed: vendor fix RHSA-2023:4470
  • Red Hat Ceph Storage 5.3 Tools rhceph/rhceph-5-rhel8 5-519, rhceph/keepalived-rhel8 2.1.5-42, rhceph/snmp-notifier-rhel8 1.2.1-69, rhceph/rhceph-5-dashboard-rhel8 5-87, rhceph/rhceph-haproxy-rhel8 2.2.19-35
    fixed: vendor fix RHSA-2024:4119
  • Red Hat Developer Tools for Red Hat Enterprise Linux Server (v. 7) go-toolset-1.19-golang 1.19.9-1.el7_9, go-toolset-1.19-golang-bin 1.19.9-1.el7_9, go-toolset-1.19-golang-src 1.19.9-1.el7_9, go-toolset-1.19-golang-misc 1.19.9-1.el7_9, go-toolset-1.19-golang-race 1.19.9-1.el7_9, go-toolset-1.19-golang-tests 1.19.9-1.el7_9 Red Hat Developer Tools for Red Hat Enterprise Linux Workstation (v. 7) go-toolset-1.19-golang 1.19.9-1.el7_9, go-toolset-1.19-golang-bin 1.19.9-1.el7_9, go-toolset-1.19-golang-src 1.19.9-1.el7_9, go-toolset-1.19-golang-misc 1.19.9-1.el7_9, go-toolset-1.19-golang-race 1.19.9-1.el7_9, go-toolset-1.19-golang-tests 1.19.9-1.el7_9
    fixed: vendor fix RHSA-2023:3323
  • Red Hat Enterprise Linux AppStream (v. 8) crit 3.15-3.module+el8.9.0+19243+df4d9ff2, crit 3.18-4.module+el8.9.0+19090+d2921118, criu 3.15-3.module+el8.9.0+19243+df4d9ff2, criu 3.18-4.module+el8.9.0+19090+d2921118, crun 1.8.3-1.module+el8.9.0+19098+6e7a5e3f, crun 1.8.7-1.module+el8.9.0+19731+94cfa27e, +68 more
    fixed: vendor fix RHSA-2023:3319
  • Red Hat Enterprise Linux AppStream (v. 9) podman 4.6.1-5.el9, skopeo 1.13.3-1.el9, buildah 1.31.3-1.el9, golang 1.19.9-2.el9_2, podman-tests 4.6.1-5.el9, toolbox 0.0.99.4-6.el9_3, +13 more
    fixed: vendor fix RHSA-2023:3318
  • Red Hat Migration Toolkit 1.7 rhmtc/openshift-velero-plugin-rhel8 v1.7.10-2
    fixed: vendor fix RHSA-2023:3624
  • Red Hat OpenShift Container Platform 4.10 skopeo 1.2.4-1.1.el8, skopeo-tests 1.2.4-1.1.el8, podman 3.2.3-1.1.rhaos4.10.el8, containers-common 1.2.4-1.1.el8, podman-tests 3.2.3-1.1.rhaos4.10.el8, podman-docker 3.2.3-1.1.rhaos4.10.el8, +204 more
    fixed: vendor fix RHSA-2023:3910
  • Red Hat OpenShift Container Platform 4.11 podman 4.0.2-7.rhaos4.11.el8, skopeo 1.5.2-4.rhaos4.11.el8, buildah 1.23.4-3.rhaos4.11.el8, podman-tests 4.0.2-7.rhaos4.11.el8, skopeo-tests 1.5.2-4.rhaos4.11.el8, podman-docker 4.0.2-7.rhaos4.11.el8, +214 more
    fixed: vendor fix RHSA-2023:3914
  • Red Hat OpenShift Container Platform 4.12 podman 4.2.0-4.1.rhaos4.12.el8, skopeo 1.9.4-2.1.rhaos4.12.el8, buildah 1.23.4-4.1.rhaos4.12.el8, podman-tests 4.2.0-4.1.rhaos4.12.el8, skopeo-tests 1.9.4-2.1.rhaos4.12.el8, podman-docker 4.2.0-4.1.rhaos4.12.el8, +192 more
    fixed: vendor fix RHSA-2023:3409
  • Red Hat OpenShift Container Platform 4.13 podman 4.4.1-4.rhaos4.13.el8, podman 4.4.1-5.1.rhaos4.13.el9, buildah 1.29.1-1.1.rhaos4.13.el9, podman-tests 4.4.1-4.rhaos4.13.el8, podman-docker 4.4.1-4.rhaos4.13.el8, podman-remote 4.4.1-4.rhaos4.13.el8, +197 more
    fixed: vendor fix RHSA-2023:3366

7 more fixed, 31 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
yes
Technical impact
total
Assessed
21 mo ago

Exploit prediction

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

CVSS scores

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

Affected packages

ecosystem package affected fixed in
bitnami golang
<1.19.9
>=1.20.0, <1.20.4
1.19.9
1.20.4
go stdlib
<1.19.9
>=1.20.0-0, <1.20.4
1.19.9
1.20.4

Affected products

  • Go standard library html/template

Classification

Weakness
  • CWE-77 Improper Neutralization of Special Elements used in a Command

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.