CVE-2023-39318
Estado: ModificadaMedia (6.1)—
The html/template package does not properly handle HTML-like "" comment tokens, nor hashbang "#!" comment tokens, in <script> contexts. This may cause the template parser to improperly interpret the contents of <script> contexts, causing actions to be improperly escaped. This may be leveraged to perform an XSS attack.
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Puntuación base: 6.1
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 0.93%
- Percentil entre todas las CVEs puntuadas: 59
- Fecha de la puntuación: 7/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
Tecnologías afectadas (1)
CWE
- CWE-79
Referencias
- https://go.dev/cl/526156
- https://go.dev/issue/62196
- https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ
- https://pkg.go.dev/vuln/GO-2023-2041
- https://security.gentoo.org/glsa/202311-09
- https://security.netapp.com/advisory/ntap-20231020-0009/
- https://go.dev/cl/526156
- https://go.dev/issue/62196
- https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ
- https://pkg.go.dev/vuln/GO-2023-2041
- https://security.gentoo.org/glsa/202311-09
- https://security.netapp.com/advisory/ntap-20231020-0009/
JSON original (NVD)
Mostrar
{
"id": "CVE-2023-39318",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2023-39318",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2024-09-26T16:02:51.219482Z"
}
}
],
"cvssMetricV31": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "CHANGED",
"version": "3.1",
"baseScore": 6.1,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"integrityImpact": "LOW",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "LOW"
},
"impactScore": 2.7,
"exploitabilityScore": 2.8
}
]
},
"affected": [
{
"source": "security@golang.org",
"affectedData": [
{
"vendor": "Go standard library",
"product": "html/template",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "1.20.8",
"versionType": "semver"
},
{
"status": "affected",
"version": "1.21.0-0",
"lessThan": "1.21.1",
"versionType": "semver"
}
],
"packageName": "html/template",
"collectionURL": "https://pkg.go.dev",
"defaultStatus": "unaffected",
"programRoutines": [
{
"name": "isComment"
},
{
"name": "escaper.escapeText"
},
{
"name": "tJS"
},
{
"name": "tLineCmt"
},
{
"name": "Template.Execute"
},
{
"name": "Template.ExecuteTemplate"
}
]
}
]
}
],
"published": "2023-09-08T17:15:27.823",
"references": [
{
"url": "https://go.dev/cl/526156",
"tags": [
"Patch"
],
"source": "security@golang.org"
},
{
"url": "https://go.dev/issue/62196",
"tags": [
"Issue Tracking"
],
"source": "security@golang.org"
},
{
"url": "https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ",
"tags": [
"Mailing List",
"Release Notes"
],
"source": "security@golang.org"
},
{
"url": "https://pkg.go.dev/vuln/GO-2023-2041",
"tags": [
"Vendor Advisory"
],
"source": "security@golang.org"
},
{
"url": "https://security.gentoo.org/glsa/202311-09",
"source": "security@golang.org"
},
{
"url": "https://security.netapp.com/advisory/ntap-20231020-0009/",
"tags": [
"Third Party Advisory"
],
"source": "security@golang.org"
},
{
"url": "https://go.dev/cl/526156",
"tags": [
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://go.dev/issue/62196",
"tags": [
"Issue Tracking"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ",
"tags": [
"Mailing List",
"Release Notes"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://pkg.go.dev/vuln/GO-2023-2041",
"tags": [
"Vendor Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://security.gentoo.org/glsa/202311-09",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://security.netapp.com/advisory/ntap-20231020-0009/",
"tags": [
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-79"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "The html/template package does not properly handle HTML-like \"\" comment tokens, nor hashbang \"#!\" comment tokens, in <script> contexts. This may cause the template parser to improperly interpret the contents of <script> contexts, causing actions to be improperly escaped. This may be leveraged to perform an XSS attack."
},
{
"lang": "es",
"value": "El paquete html/template no maneja correctamente los tokens de comentario \"\" similares a HTML, ni los tokens de comentario hashbang \"#!\", en el contexto "
}
],
"lastModified": "2026-06-17T06:12:01.240",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "F1B13F8E-84CD-45E0-8DC5-FFF2A1E5E162",
"versionEndExcluding": "1.20.8"
},
{
"criteria": "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "958E1BA0-2840-47E9-A790-79C10164C68C",
"versionEndExcluding": "1.21.1",
"versionStartIncluding": "1.21.0"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security@golang.org"
}