CVEfocus › CVE database › CVE-2023-24540

CVE-2023-24540Improper handling of JavaScript whitespace in html/template

CVSS 9.8 CriticalEPSS 1.9% (higher than 80% of CVEs)Published 2023-05-11Updated 2025-01-24Assigner: Go

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.

CWE-77

What to do

Fixed builds are available from AlmaLinux, Alpine, Go, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Debian has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

156Fixed
1Fix pending
8Will not fix
25Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04golang-1.20Not affected
vulnerable_code_not_present
Ubuntu 20.04golang-1.20Not affected
vulnerable_code_not_present
Debian 12golang-1.19Fix pendingDEBIAN-CVE-2023-24540
Red Hat Enterprise Linux 9buildahFixed1:1.31.3-1.el9RHSA-2023:6473
Red Hat Enterprise Linux 9buildah-testsFixed1:1.31.3-1.el9RHSA-2023:6473
Red Hat Enterprise Linux 9conmonNot affected
Red Hat Enterprise Linux 9containernetworking-pluginsFixed1:1.3.0-4.el9RHSA-2023:6402
Red Hat Enterprise Linux 9golangFixed0:1.19.9-2.el9_2RHSA-2023:3318
Red Hat Enterprise Linux 9golang-binFixed0:1.19.9-2.el9_2RHSA-2023:3318
Red Hat Enterprise Linux 9golang-docsFixed0:1.19.9-2.el9_2RHSA-2023:3318
Red Hat Enterprise Linux 9golang-miscFixed0:1.19.9-2.el9_2RHSA-2023:3318
Red Hat Enterprise Linux 9golang-raceFixed0:1.19.9-2.el9_2RHSA-2023:3318
Red Hat Enterprise Linux 9golang-srcFixed0:1.19.9-2.el9_2RHSA-2023:3318
Red Hat Enterprise Linux 9golang-testsFixed0:1.19.9-2.el9_2RHSA-2023:3318
Red Hat Enterprise Linux 9grafanaNot affected
Red Hat Enterprise Linux 9grafana-pcpNot affected
Red Hat Enterprise Linux 9grafana-selinuxNot affected
Red Hat Enterprise Linux 9ignitionNot affected
Red Hat Enterprise Linux 9ignition-edgeNot affected
Red Hat Enterprise Linux 9ignition-grubNot affected
Red Hat Enterprise Linux 9ignition-validateNot affected
Red Hat Enterprise Linux 9osbuild-composerWill not fix
Will not fix
Red Hat Enterprise Linux 9osbuild-composer-coreWill not fix
Will not fix
Red Hat Enterprise Linux 9osbuild-composer-dnf-jsonWill not fix
Will not fix
Red Hat Enterprise Linux 9osbuild-composer-workerWill not fix
Will not fix
Red Hat Enterprise Linux 9podmanFixed2:4.6.1-5.el9RHSA-2023:6474
Red Hat Enterprise Linux 9podman-dockerFixed2:4.6.1-5.el9RHSA-2023:6474
Red Hat Enterprise Linux 9podman-gvproxyFixed2:4.6.1-5.el9RHSA-2023:6474
Red Hat Enterprise Linux 9podman-pluginsFixed2:4.6.1-5.el9RHSA-2023:6474
Red Hat Enterprise Linux 9podman-remoteFixed2:4.6.1-5.el9RHSA-2023:6474
Red Hat Enterprise Linux 9podman-testsFixed2:4.6.1-5.el9RHSA-2023:6474
Red Hat Enterprise Linux 9skopeoFixed2:1.13.3-1.el9RHSA-2023:6363
Red Hat Enterprise Linux 9skopeo-testsFixed2:1.13.3-1.el9RHSA-2023:6363
Red Hat Enterprise Linux 9toolboxFixed0:0.0.99.4-6.el9_3RHSA-2023:6346
Red Hat Enterprise Linux 9toolbox-testsFixed0:0.0.99.4-6.el9_3RHSA-2023:6346
Red Hat Enterprise Linux 8aardvark-dnsFixed2:1.7.0-1.module+el8.9.0+19244+655f84eeRHSA-2023:6938
Red Hat Enterprise Linux 8buildahFixed1:1.31.3-1.module+el8.9.0+19761+326da906RHSA-2023:6938
Red Hat Enterprise Linux 8buildah-testsFixed1:1.24.6-7.module+el8.9.0+19784+443be299RHSA-2023:6939
Red Hat Enterprise Linux 8cockpit-podmanFixed0:46-1.module+el8.9.0+19098+6e7a5e3fRHSA-2023:6939
Red Hat Enterprise Linux 8conmonFixed3:2.1.8-1.module+el8.9.0+19761+326da906RHSA-2023:6938
Red Hat Enterprise Linux 8container-selinuxFixed2:2.221.0-1.module+el8.9.0+19685+019f3589RHSA-2023:6938
Red Hat Enterprise Linux 8containernetworking-pluginsFixed
Will not fix
1:1.1.1-5.module+el8.9.0+19784+443be299RHSA-2023:6939
Red Hat Enterprise Linux 8containers-commonFixed
Will not fix
2:1-54.module+el8.9.0+19761+326da906RHSA-2023:6938
Red Hat Enterprise Linux 8critFixed0:3.15-3.module+el8.9.0+19243+df4d9ff2RHSA-2023:6939
Red Hat Enterprise Linux 8criuFixed0:3.18-4.module+el8.9.0+19090+d2921118RHSA-2023:6938
Red Hat Enterprise Linux 8criu-develFixed0:3.18-4.module+el8.9.0+19090+d2921118RHSA-2023:6938
Red Hat Enterprise Linux 8criu-libsFixed0:3.15-3.module+el8.9.0+19243+df4d9ff2RHSA-2023:6939
Red Hat Enterprise Linux 8crunFixed0:1.8.7-1.module+el8.9.0+19731+94cfa27eRHSA-2023:6938
Red Hat Enterprise Linux 8delveFixed0:1.9.1-1.module+el8.8.0+16778+5fbb74f5RHSA-2023:3319
Red Hat Enterprise Linux 8fuse-overlayfsFixed0:1.9-2.module+el8.9.0+19098+6e7a5e3fRHSA-2023:6939
Red Hat Enterprise Linux 8go-toolsetFixed0:1.19.9-1.module+el8.8.0+18857+fca43658RHSA-2023:3319
Red Hat Enterprise Linux 8golangFixed0:1.19.9-1.module+el8.8.0+18857+fca43658RHSA-2023:3319
Red Hat Enterprise Linux 8golang-binFixed0:1.19.9-1.module+el8.8.0+18857+fca43658RHSA-2023:3319
Red Hat Enterprise Linux 8golang-docsFixed0:1.19.9-1.module+el8.8.0+18857+fca43658RHSA-2023:3319
Red Hat Enterprise Linux 8golang-miscFixed0:1.19.9-1.module+el8.8.0+18857+fca43658RHSA-2023:3319
Red Hat Enterprise Linux 8golang-raceFixed0:1.19.9-1.module+el8.8.0+18857+fca43658RHSA-2023:3319
Red Hat Enterprise Linux 8golang-srcFixed0:1.19.9-1.module+el8.8.0+18857+fca43658RHSA-2023:3319
Red Hat Enterprise Linux 8golang-testsFixed0:1.19.9-1.module+el8.8.0+18857+fca43658RHSA-2023:3319
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 8grafana-azure-monitorNot affected
Red Hat Enterprise Linux 8grafana-cloudwatchNot affected
Red Hat Enterprise Linux 8grafana-elasticsearchNot affected
Red Hat Enterprise Linux 8grafana-graphiteNot affected
Red Hat Enterprise Linux 8grafana-influxdbNot affected
Red Hat Enterprise Linux 8grafana-lokiNot affected
Red Hat Enterprise Linux 8grafana-mssqlNot affected
Red Hat Enterprise Linux 8grafana-mysqlNot affected
Red Hat Enterprise Linux 8grafana-opentsdbNot affected
Red Hat Enterprise Linux 8grafana-pcpNot affected
Red Hat Enterprise Linux 8grafana-postgresNot affected
Red Hat Enterprise Linux 8grafana-prometheusNot affected
Red Hat Enterprise Linux 8grafana-selinuxNot affected
Red Hat Enterprise Linux 8grafana-stackdriverNot affected
Red Hat Enterprise Linux 8libslirpFixed0:4.4.0-1.module+el8.9.0+19244+655f84eeRHSA-2023:6938
Red Hat Enterprise Linux 8libslirp-develFixed0:4.4.0-1.module+el8.9.0+19243+df4d9ff2RHSA-2023:6939
Red Hat Enterprise Linux 8netavarkFixed2:1.0.1-38.module+el8.9.0+19098+6e7a5e3fRHSA-2023:6939
Red Hat Enterprise Linux 8oci-seccomp-bpf-hookFixed0:1.2.9-1.module+el8.9.0+19090+d2921118RHSA-2023:6938
Red Hat Enterprise Linux 8osbuild-composerWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composer-coreWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composer-dnf-jsonWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composer-workerWill not fix
Will not fix
Red Hat Enterprise Linux 8podmanFixed2:4.0.2-24.module+el8.9.0+19784+443be299RHSA-2023:6939
Red Hat Enterprise Linux 8podman-catatonitFixed3:4.6.1-4.module+el8.9.0+19761+326da906RHSA-2023:6938
Red Hat Enterprise Linux 8podman-dockerFixed2:4.0.2-24.module+el8.9.0+19784+443be299RHSA-2023:6939
Red Hat Enterprise Linux 8podman-gvproxyFixed2:4.0.2-24.module+el8.9.0+19784+443be299RHSA-2023:6939
Red Hat Enterprise Linux 8podman-pluginsFixed3:4.6.1-4.module+el8.9.0+19761+326da906RHSA-2023:6938
Red Hat Enterprise Linux 8podman-remoteFixed3:4.6.1-4.module+el8.9.0+19761+326da906RHSA-2023:6938
Red Hat Enterprise Linux 8podman-testsFixed2:4.0.2-24.module+el8.9.0+19784+443be299RHSA-2023:6939
Red Hat Enterprise Linux 8python-podmanFixed0:4.6.0-1.module+el8.9.0+19513+83322573RHSA-2023:6938
Red Hat Enterprise Linux 8python3-criuFixed0:3.18-4.module+el8.9.0+19090+d2921118RHSA-2023:6938
Red Hat Enterprise Linux 8python3-podmanFixed0:4.6.0-1.module+el8.9.0+19513+83322573RHSA-2023:6938
Red Hat Enterprise Linux 8runcFixed1:1.1.5-2.module+el8.9.0+19104+fcef53a3RHSA-2023:6939
Red Hat Enterprise Linux 8skopeoFixed
Will not fix
2:1.6.2-8.module+el8.9.0+19104+fcef53a3RHSA-2023:6939
Red Hat Enterprise Linux 8skopeo-testsFixed
Will not fix
2:1.6.2-8.module+el8.9.0+19104+fcef53a3RHSA-2023:6939
Red Hat Enterprise Linux 8slirp4netnsFixed0:1.1.8-3.module+el8.9.0+19098+6e7a5e3fRHSA-2023:6939
Red Hat Enterprise Linux 8toolboxFixed
Will not fix
0:0.0.99.4-5.module+el8.9.0+19656+a0b7daebRHSA-2023:6939
Red Hat Enterprise Linux 8toolbox-testsFixed
Will not fix
0:0.0.99.4-5.module+el8.9.0+19655+b08391f8RHSA-2023:6938
Red Hat Enterprise Linux 8udicaFixed0:0.2.6-20.module+el8.9.0+19244+655f84eeRHSA-2023:6938
AlmaLinux 9buildahFixed1:1.31.3-1.el9ALSA-2023:6473
AlmaLinux 9buildah-testsFixed1:1.31.3-1.el9ALSA-2023:6473
AlmaLinux 9containernetworking-pluginsFixed1:1.3.0-4.el9ALSA-2023:6402
AlmaLinux 9go-toolsetFixed1.19.9-1.el9_2ALSA-2023:3318
AlmaLinux 9golangFixed1.19.9-2.el9_2ALSA-2023:3318
AlmaLinux 9golang-binFixed1.19.9-2.el9_2ALSA-2023:3318
AlmaLinux 9golang-docsFixed1.19.9-2.el9_2ALSA-2023:3318
AlmaLinux 9golang-miscFixed1.19.9-2.el9_2ALSA-2023:3318
AlmaLinux 9golang-raceFixed1.19.9-2.el9_2ALSA-2023:3318
AlmaLinux 9golang-srcFixed1.19.9-2.el9_2ALSA-2023:3318
AlmaLinux 9golang-testsFixed1.19.9-2.el9_2ALSA-2023:3318
AlmaLinux 9podmanFixed2:4.6.1-5.el9ALSA-2023:6474
AlmaLinux 9podman-dockerFixed2:4.6.1-5.el9ALSA-2023:6474
AlmaLinux 9podman-gvproxyFixed2:4.6.1-5.el9ALSA-2023:6474
AlmaLinux 9podman-pluginsFixed2:4.6.1-5.el9ALSA-2023:6474
AlmaLinux 9podman-remoteFixed2:4.6.1-5.el9ALSA-2023:6474
AlmaLinux 9podman-testsFixed2:4.6.1-5.el9ALSA-2023:6474
AlmaLinux 9skopeoFixed2:1.13.3-1.el9ALSA-2023:6363
AlmaLinux 9skopeo-testsFixed2:1.13.3-1.el9ALSA-2023:6363
AlmaLinux 9toolboxFixed0.0.99.4-6.el9_3ALSA-2023:6346
AlmaLinux 9toolbox-testsFixed0.0.99.4-6.el9_3ALSA-2023:6346
AlmaLinux 8aardvark-dnsFixed2:1.0.1-38.module_el8.9.0+3627+db8ec155ALSA-2023:6939
AlmaLinux 8buildahFixed1:1.31.3-1.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8buildah-testsFixed1:1.31.3-1.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8cockpit-podmanFixed46-1.module_el8.7.0+3344+5bcd850fALSA-2023:6939
AlmaLinux 8conmonFixed3:2.1.8-1.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8container-selinuxFixed2:2.221.0-1.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8containernetworking-pluginsFixed1:1.1.1-5.module_el8.9.0+3627+db8ec155ALSA-2023:6939
AlmaLinux 8containers-commonFixed2:1-38.module_el8.9.0+3627+db8ec155ALSA-2023:6939
AlmaLinux 8critFixed3.18-4.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8criuFixed3.15-3.module_el8.6.0+2877+8e437bf5ALSA-2023:6939
AlmaLinux 8criu-develFixed3.15-3.module_el8.6.0+2877+8e437bf5ALSA-2023:6939
AlmaLinux 8criu-libsFixed3.18-4.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8crunFixed1.8.7-1.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8delveFixed1.9.1-1.module_el8.8.0+3471+a62632a0ALSA-2023:3319
AlmaLinux 8fuse-overlayfsFixed1.12-1.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8go-toolsetFixed1.19.9-1.module_el8.8.0+3570+5dc5ffc3ALSA-2023:3319
AlmaLinux 8golangFixed1.19.9-1.module_el8.8.0+3570+5dc5ffc3ALSA-2023:3319
AlmaLinux 8golang-binFixed1.19.9-1.module_el8.8.0+3570+5dc5ffc3ALSA-2023:3319
AlmaLinux 8golang-docsFixed1.19.9-1.module_el8.8.0+3570+5dc5ffc3ALSA-2023:3319
AlmaLinux 8golang-miscFixed1.19.9-1.module_el8.8.0+3570+5dc5ffc3ALSA-2023:3319
AlmaLinux 8golang-raceFixed1.19.9-1.module_el8.8.0+3570+5dc5ffc3ALSA-2023:3319
AlmaLinux 8golang-srcFixed1.19.9-1.module_el8.8.0+3570+5dc5ffc3ALSA-2023:3319
AlmaLinux 8golang-testsFixed1.19.9-1.module_el8.8.0+3570+5dc5ffc3ALSA-2023:3319
AlmaLinux 8libslirpFixed4.4.0-1.module_el8.6.0+3137+d33c3efbALSA-2023:6938
AlmaLinux 8libslirp-develFixed4.4.0-1.module_el8.6.0+2877+8e437bf5ALSA-2023:6938
AlmaLinux 8netavarkFixed2:1.7.0-1.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8oci-seccomp-bpf-hookFixed1.2.5-2.module_el8.8.0+3468+16b86c82ALSA-2023:6939
AlmaLinux 8podmanFixed2:4.0.2-24.module_el8.9.0+3627+db8ec155ALSA-2023:6939
AlmaLinux 8podman-catatonitFixed3:4.6.1-4.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8podman-dockerFixed2:4.0.2-24.module_el8.9.0+3627+db8ec155ALSA-2023:6939
AlmaLinux 8podman-gvproxyFixed3:4.6.1-4.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8podman-pluginsFixed3:4.6.1-4.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8podman-remoteFixed2:4.0.2-24.module_el8.9.0+3627+db8ec155ALSA-2023:6939
AlmaLinux 8podman-testsFixed3:4.6.1-4.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8python3-criuFixed3.15-3.module_el8.6.0+2877+8e437bf5ALSA-2023:6939
AlmaLinux 8python3-podmanFixed4.6.0-1.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8runcFixed1:1.1.9-1.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8skopeoFixed2:1.6.2-8.module_el8.9.0+3627+db8ec155ALSA-2023:6939
AlmaLinux 8skopeo-testsFixed2:1.6.2-8.module_el8.9.0+3627+db8ec155ALSA-2023:6939
AlmaLinux 8slirp4netnsFixed1.2.1-1.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8toolboxFixed0.0.99.4-5.module_el8.9.0+3643+9234dc3bALSA-2023:6938
AlmaLinux 8toolbox-testsFixed0.0.99.4-5.module_el8.9.0+3627+db8ec155ALSA-2023:6939
AlmaLinux 8udicaFixed0.2.6-20.module_el8.8.0+3615+3543c705ALSA-2023:6938
Rocky Linux 8buildahFixed1:1.24.6-7.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8cockpit-podmanFixed0:46-1.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8conmonFixed2:2.1.4-2.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8container-selinuxFixed2:2.205.0-3.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8containernetworking-pluginsFixed1:1.1.1-5.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8containers-commonFixed2:1-38.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8criuFixed0:3.15-3.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8crunFixed0:1.8.3-1.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8delveFixed0:1.9.1-1.module+el8.8.0+1263+19d1a562RLSA-2023:3319
Rocky Linux 8fuse-overlayfsFixed0:1.9-2.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8go-toolsetFixed0:1.19.9-1.module+el8.8.0+1298+7af20600RLSA-2023:3319
Rocky Linux 8golangFixed0:1.19.9-1.module+el8.8.0+1298+7af20600RLSA-2023:3319
Rocky Linux 8libslirpFixed0:4.4.0-1.module+el8.9.0+1445+07728297RLSA-2023:6939
Rocky Linux 8oci-seccomp-bpf-hookFixed0:1.2.5-2.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8podmanFixed2:4.0.2-24.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8python-podmanFixed0:4.0.0-2.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8runcFixed1:1.1.5-2.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8slirp4netnsFixed0:1.1.8-3.module+el8.9.0+1445+07728297RLSA-2023:6938
Rocky Linux 8udicaFixed0:0.2.6-4.module+el8.9.0+1445+07728297RLSA-2023:6938
Alpine Linux 3.24goFixed1.20.4-r0ALPINE-CVE-2023-24540
Alpine Linux 3.23goFixed1.20.4-r0ALPINE-CVE-2023-24540
Alpine Linux 3.22goFixed1.20.4-r0ALPINE-CVE-2023-24540
Alpine Linux 3.21goFixed1.20.4-r0ALPINE-CVE-2023-24540
Alpine Linux 3.20goFixed1.20.4-r0ALPINE-CVE-2023-24540
Alpine Linux 3.19goFixed1.20.4-r0ALPINE-CVE-2023-24540
Alpine Linux 3.18goFixed1.20.4-r0ALPINE-CVE-2023-24540
Alpine Linux 3.17goFixed1.19.9-r0ALPINE-CVE-2023-24540
Go librarystdlibFixed1.19.9GO-2023-1752

What the vendor says

As published in the CVE record by Go, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.