CVE-2023-24540: Improper handling of JavaScript whitespace in html/template
Vulnerability summary
CVE-2023-24540 is a critical (CVSS 9.8) vulnerability in go standard library html/template. EPSS estimates a 1.56% chance of exploitation in the next 30 days, higher than 75.2% of scored vulnerabilities.
Severe, CVSS 9.8 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 2% (FIRST, 03-11-2026)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 23 · Related 10Timeline
- 11-05-2023PublishedVulnerability first disclosed.
- 24-01-2025Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
8 scores · 8 sources · 1 version- OSV · Red hatEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · WolfiEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · ChainguardEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVDNIST9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · AlpineEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.56%
Chance of exploitation in the next 30 days
Percentile
75%
Versus all other CVEs
30-day change
No change 0.00 pp
From 1.56% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Redhat16 products
- buildah< 1:1.23.4-4.1.rhaos4.12.el8
- buildah-debuginfo< 1:1.23.4-4.1.rhaos4.12.el8
- buildah-debugsource< 1:1.23.4-4.1.rhaos4.12.el8
- buildah-tests< 1:1.23.4-4.1.rhaos4.12.el8
- buildah-tests-debuginfo< 1:1.23.4-4.1.rhaos4.12.el8
Chainguard11 products
- go-1.20< 1.20.4-r0
- katib-earlystopping< 0.19.0-r31
- katib-suggestion-goptuna-compat< 0.19.0-r40
- katib-suggestion-hyperband< 0.19.0-r31
- katib-suggestion-hyperopt< 0.19.0-r40 | < 0.19.0-r31
Wolfi11 products
- go-1.20< 1.20.4-r0
- katib-earlystopping< 0.19.0-r31
- katib-suggestion-goptuna-compat< 0.19.0-r40
- katib-suggestion-hyperband< 0.19.0-r31
- katib-suggestion-hyperopt< 0.19.0-r40 | < 0.19.0-r31
Alpine1 product
- go≥ 1.20.0, < 1.19.9-r0 | ≥ 1.20.0, < 1.20.4-r0
Debian1 product
- golang-1.19All versions (No fix recorded)
Go1 product
- stdlib≥ 1.20.0-0, < 1.20.4
Go standard library1 product
- html/template< 1.19.9 | ≥ 1.20.0-0, < 1.20.4
Golang1 product
- go< 1.19.9 | ≥ 1.20.0, < 1.20.4
Ubuntu1 product
- golang-1.20< 1.20.3-1ubuntu0.1~20.04 | < 1.20.3-1ubuntu0.1~22.04
9 vendors · 44 products
References
25 linksShow all 25 references
- pkg.go.devWEB