Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
CVE Vulnerability Details :
CVE-2023-24538
PUBLISHED
More InfoOfficial Page
Assigner-Go
Assigner Org ID-1bb62c36-49e3-4200-9d77-64a1400537cc
View Known Exploited Vulnerability (KEV) details
Published At-06 Apr, 2023 | 15:50
Updated At-13 Feb, 2025 | 16:44
Rejected At-
▼CVE Numbering Authority (CNA)
Backticks not treated as string delimiters in html/template

Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template contains a Go template action within a Javascript template literal, the contents of the action can be used to terminate the literal, injecting arbitrary Javascript code into the Go template. As ES6 template literals are rather complex, and themselves can do string interpolation, the decision was made to simply disallow Go template actions from being used inside of them (e.g. "var a = {{.}}"), since there is no obviously safe way to allow this behavior. This takes the same approach as github.com/google/safehtml. With fix, Template.Parse returns an Error when it encounters templates like this, with an ErrorCode of value 12. This ErrorCode is currently unexported, but will be exported in the release of Go 1.21. Users who rely on the previous behavior can re-enable it using the GODEBUG flag jstmpllitinterp=1, with the caveat that backticks will now be escaped. This should be used with caution.

Affected Products
Vendor
Go standard library
Product
html/template
Collection URL
https://pkg.go.dev
Package Name
html/template
Program Routines
  • tJS
  • tJSDelimited
  • Template.Execute
  • Template.ExecuteTemplate
Default Status
unaffected
Versions
Affected
  • From 0 before 1.19.8 (semver)
  • From 1.20.0-0 before 1.20.3 (semver)
Problem Types
TypeCWE IDDescription
N/AN/ACWE-94: Improper Control of Generation of Code ('Code Injection')
Type: N/A
CWE ID: N/A
Description: CWE-94: Improper Control of Generation of Code ('Code Injection')
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Sohom Datta, Manipal Institute of Technology
Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://go.dev/issue/59234
N/A
https://go.dev/cl/482079
N/A
https://groups.google.com/g/golang-announce/c/Xdv6JL9ENs8
N/A
https://pkg.go.dev/vuln/GO-2023-1703
N/A
https://security.gentoo.org/glsa/202311-09
N/A
Hyperlink: https://go.dev/issue/59234
Resource: N/A
Hyperlink: https://go.dev/cl/482079
Resource: N/A
Hyperlink: https://groups.google.com/g/golang-announce/c/Xdv6JL9ENs8
Resource: N/A
Hyperlink: https://pkg.go.dev/vuln/GO-2023-1703
Resource: N/A
Hyperlink: https://security.gentoo.org/glsa/202311-09
Resource: N/A
▼Authorized Data Publishers (ADP)
1. CVE Program Container
Affected Products
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://go.dev/issue/59234
x_transferred
https://go.dev/cl/482079
x_transferred
https://groups.google.com/g/golang-announce/c/Xdv6JL9ENs8
x_transferred
https://pkg.go.dev/vuln/GO-2023-1703
x_transferred
https://security.gentoo.org/glsa/202311-09
x_transferred
https://security.netapp.com/advisory/ntap-20241115-0007/
N/A
Hyperlink: https://go.dev/issue/59234
Resource:
x_transferred
Hyperlink: https://go.dev/cl/482079
Resource:
x_transferred
Hyperlink: https://groups.google.com/g/golang-announce/c/Xdv6JL9ENs8
Resource:
x_transferred
Hyperlink: https://pkg.go.dev/vuln/GO-2023-1703
Resource:
x_transferred
Hyperlink: https://security.gentoo.org/glsa/202311-09
Resource:
x_transferred
Hyperlink: https://security.netapp.com/advisory/ntap-20241115-0007/
Resource: N/A
2. CISA ADP Vulnrichment
Affected Products
Problem Types
TypeCWE IDDescription
CWECWE-94CWE-94 Improper Control of Generation of Code ('Code Injection')
Type: CWE
CWE ID: CWE-94
Description: CWE-94 Improper Control of Generation of Code ('Code Injection')
Metrics
VersionBase scoreBase severityVector
3.19.8CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Version: 3.1
Base score: 9.8
Base severity: CRITICAL
Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
Details not found