CVE-2024-24785 (GCVE-0-2024-24785)
Vulnerability from cvelistv5 – Published: 2024-03-05 22:22 – Updated: 2025-03-14 00:55
VLAI
EPSS
VEX
Title
Errors returned from JSON marshaling may break template escaping in html/template
Summary
If errors returned from MarshalJSON methods contain user controlled data, they may be used to break the contextual auto-escaping behavior of the html/template package, allowing for subsequent actions to inject unexpected content into templates.
Severity
5.4 (Medium)
SSVC
Exploitation: none
Automatable: no
Technical Impact: partial
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2024-03-06 18:49 UTC
CWE
- CWE-150 - Improper Neutralization of Escape, Meta, or Control Sequences
Assigner
References
Impacted products
1 product
| Vendor | Product | Version | CPE status | |
|---|---|---|---|---|
| Go standard library | html/template |
Affected:
0 , < 1.21.8
(semver)
Affected: 1.22.0-0 , < 1.22.1 (semver) |
guessed |
{
"containers": {
"adp": [
{
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "NONE",
"baseScore": 5.4,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "LOW",
"integrityImpact": "LOW",
"privilegesRequired": "LOW",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N",
"version": "3.1"
}
},
{
"other": {
"content": {
"id": "CVE-2024-24785",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2024-03-06T18:49:44.784868Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2025-03-14T00:55:26.398Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
},
{
"providerMetadata": {
"dateUpdated": "2024-08-01T23:28:12.537Z",
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE"
},
"references": [
{
"tags": [
"x_transferred"
],
"url": "https://go.dev/issue/65697"
},
{
"tags": [
"x_transferred"
],
"url": "https://go.dev/cl/564196"
},
{
"tags": [
"x_transferred"
],
"url": "https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg"
},
{
"tags": [
"x_transferred"
],
"url": "https://pkg.go.dev/vuln/GO-2024-2610"
},
{
"tags": [
"x_transferred"
],
"url": "https://security.netapp.com/advisory/ntap-20240329-0008/"
},
{
"tags": [
"x_transferred"
],
"url": "http://www.openwall.com/lists/oss-security/2024/03/08/4"
}
],
"title": "CVE Program Container"
}
],
"cna": {
"affected": [
{
"collectionURL": "https://pkg.go.dev",
"defaultStatus": "unaffected",
"packageName": "html/template",
"product": "html/template",
"programRoutines": [
{
"name": "jsValEscaper"
},
{
"name": "escaper.commit"
},
{
"name": "Template.Execute"
},
{
"name": "Template.ExecuteTemplate"
}
],
"vendor": "Go standard library",
"versions": [
{
"lessThan": "1.21.8",
"status": "affected",
"version": "0",
"versionType": "semver"
},
{
"lessThan": "1.22.1",
"status": "affected",
"version": "1.22.0-0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"value": "RyotaK (https://ryotak.net)"
}
],
"descriptions": [
{
"lang": "en",
"value": "If errors returned from MarshalJSON methods contain user controlled data, they may be used to break the contextual auto-escaping behavior of the html/template package, allowing for subsequent actions to inject unexpected content into templates."
}
],
"problemTypes": [
{
"descriptions": [
{
"description": "CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences",
"lang": "en"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2024-05-01T17:09:37.492Z",
"orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
"shortName": "Go"
},
"references": [
{
"url": "https://go.dev/issue/65697"
},
{
"url": "https://go.dev/cl/564196"
},
{
"url": "https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg"
},
{
"url": "https://pkg.go.dev/vuln/GO-2024-2610"
},
{
"url": "https://security.netapp.com/advisory/ntap-20240329-0008/"
},
{
"url": "http://www.openwall.com/lists/oss-security/2024/03/08/4"
}
],
"title": "Errors returned from JSON marshaling may break template escaping in html/template"
}
},
"cveMetadata": {
"assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
"assignerShortName": "Go",
"cveId": "CVE-2024-24785",
"datePublished": "2024-03-05T22:22:33.640Z",
"dateReserved": "2024-01-30T16:05:14.757Z",
"dateUpdated": "2025-03-14T00:55:26.398Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1",
"vulnerability-lookup:meta": {
"epss": {
"cve": "CVE-2024-24785",
"date": "2026-09-27",
"epss": "0.00795",
"percentile": "0.54675"
},
"fkie_nvd": {
"descriptions": [
{
"lang": "en",
"value": "If errors returned from MarshalJSON methods contain user controlled data, they may be used to break the contextual auto-escaping behavior of the html/template package, allowing for subsequent actions to inject unexpected content into templates."
},
{
"lang": "es",
"value": "Si los errores devueltos por los m\u00e9todos MarshalJSON contienen datos controlados por el usuario, se pueden usar para romper el comportamiento de escape autom\u00e1tico contextual del paquete html/template, permitiendo acciones posteriores para inyectar contenido inesperado en las plantillas."
}
],
"id": "CVE-2024-24785",
"lastModified": "2024-11-21T08:59:41.997",
"published": "2024-03-05T23:15:07.777",
"references": [
{
"source": "security@golang.org",
"url": "http://www.openwall.com/lists/oss-security/2024/03/08/4"
},
{
"source": "security@golang.org",
"url": "https://go.dev/cl/564196"
},
{
"source": "security@golang.org",
"url": "https://go.dev/issue/65697"
},
{
"source": "security@golang.org",
"url": "https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg"
},
{
"source": "security@golang.org",
"url": "https://pkg.go.dev/vuln/GO-2024-2610"
},
{
"source": "security@golang.org",
"url": "https://security.netapp.com/advisory/ntap-20240329-0008/"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "http://www.openwall.com/lists/oss-security/2024/03/08/4"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://go.dev/cl/564196"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://go.dev/issue/65697"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://pkg.go.dev/vuln/GO-2024-2610"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://security.netapp.com/advisory/ntap-20240329-0008/"
}
],
"sourceIdentifier": "security@golang.org",
"vulnStatus": "Awaiting Analysis"
},
"microsoft_vex": {
"current_release_date": "2026-09-17T01:55:01.000Z",
"cve": "CVE-2024-24785",
"id": "msrc_CVE-2024-24785",
"initial_release_date": "2025-09-04T00:47:50.000Z",
"product_status:fixed": "3",
"product_status:known_affected": "4",
"product_status:known_not_affected": "12",
"source": "Microsoft CSAF VEX",
"status": "final",
"title": "Errors returned from JSON marshaling may break template escaping in html/template",
"url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2024-24785.json",
"version": "6"
},
"nvd": {
"cve": {
"affected": [
{
"affectedData": [
{
"collectionURL": "https://pkg.go.dev",
"defaultStatus": "unaffected",
"packageName": "html/template",
"product": "html/template",
"programRoutines": [
{
"name": "jsValEscaper"
},
{
"name": "escaper.commit"
},
{
"name": "Template.Execute"
},
{
"name": "Template.ExecuteTemplate"
}
],
"vendor": "Go standard library",
"versions": [
{
"lessThan": "1.21.8",
"status": "affected",
"version": "0",
"versionType": "semver"
},
{
"lessThan": "1.22.1",
"status": "affected",
"version": "1.22.0-0",
"versionType": "semver"
}
]
}
],
"source": "security@golang.org"
}
],
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "If errors returned from MarshalJSON methods contain user controlled data, they may be used to break the contextual auto-escaping behavior of the html/template package, allowing for subsequent actions to inject unexpected content into templates."
},
{
"lang": "es",
"value": "Si los errores devueltos por los m\u00e9todos MarshalJSON contienen datos controlados por el usuario, se pueden usar para romper el comportamiento de escape autom\u00e1tico contextual del paquete html/template, permitiendo acciones posteriores para inyectar contenido inesperado en las plantillas."
}
],
"id": "CVE-2024-24785",
"lastModified": "2026-06-17T07:14:51.357",
"metrics": {
"cvssMetricV31": [
{
"cvssData": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "NONE",
"baseScore": 5.4,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "LOW",
"integrityImpact": "LOW",
"privilegesRequired": "LOW",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N",
"version": "3.1"
},
"exploitabilityScore": 2.8,
"impactScore": 2.5,
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary"
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2024-24785",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2024-03-06T18:49:44.784868Z",
"version": "2.0.3"
}
}
]
},
"published": "2024-03-05T23:15:07.777",
"references": [
{
"source": "security@golang.org",
"url": "http://www.openwall.com/lists/oss-security/2024/03/08/4"
},
{
"source": "security@golang.org",
"url": "https://go.dev/cl/564196"
},
{
"source": "security@golang.org",
"url": "https://go.dev/issue/65697"
},
{
"source": "security@golang.org",
"url": "https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg"
},
{
"source": "security@golang.org",
"url": "https://pkg.go.dev/vuln/GO-2024-2610"
},
{
"source": "security@golang.org",
"url": "https://security.netapp.com/advisory/ntap-20240329-0008/"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "http://www.openwall.com/lists/oss-security/2024/03/08/4"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://go.dev/cl/564196"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://go.dev/issue/65697"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://pkg.go.dev/vuln/GO-2024-2610"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://security.netapp.com/advisory/ntap-20240329-0008/"
}
],
"sourceIdentifier": "security@golang.org",
"vulnStatus": "Deferred"
}
},
"redhat_vex": {
"aggregate_severity": "Moderate",
"current_release_date": "2026-08-12T15:47:49+00:00",
"cve": "CVE-2024-24785",
"id": "CVE-2024-24785",
"initial_release_date": "2024-03-05T00:00:00+00:00",
"product_status:fixed": "1456",
"product_status:known_affected": "72",
"product_status:known_not_affected": "847",
"source": "Red Hat CSAF VEX",
"status": "final",
"title": "golang: html/template: errors returned from MarshalJSON methods may break template escaping",
"url": "https://security.access.redhat.com/data/csaf/v2/vex/2024/cve-2024-24785.json",
"version": "3"
},
"suse_vex": {
"aggregate_severity": "important",
"current_release_date": "2026-08-13T01:55:18Z",
"cve": "CVE-2024-24785",
"id": "CVE-2024-24785",
"initial_release_date": "2024-03-06T04:33:36Z",
"product_status:recommended": "249",
"source": "SUSE CSAF VEX",
"status": "interim",
"title": "SUSE CVE CVE-2024-24785",
"url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2024-24785.json",
"version": "27"
},
"vulnrichment": {
"containers": {
"adp": [
{
"providerMetadata": {
"dateUpdated": "2024-08-01T23:28:12.537Z",
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE"
},
"references": [
{
"tags": [
"x_transferred"
],
"url": "https://go.dev/issue/65697"
},
{
"tags": [
"x_transferred"
],
"url": "https://go.dev/cl/564196"
},
{
"tags": [
"x_transferred"
],
"url": "https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg"
},
{
"tags": [
"x_transferred"
],
"url": "https://pkg.go.dev/vuln/GO-2024-2610"
},
{
"tags": [
"x_transferred"
],
"url": "https://security.netapp.com/advisory/ntap-20240329-0008/"
},
{
"tags": [
"x_transferred"
],
"url": "http://www.openwall.com/lists/oss-security/2024/03/08/4"
}
],
"title": "CVE Program Container"
},
{
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "NONE",
"baseScore": 5.4,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "LOW",
"integrityImpact": "LOW",
"privilegesRequired": "LOW",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N",
"version": "3.1"
}
},
{
"other": {
"content": {
"id": "CVE-2024-24785",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2024-03-06T18:49:44.784868Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2024-05-23T19:01:11.722Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"collectionURL": "https://pkg.go.dev",
"defaultStatus": "unaffected",
"packageName": "html/template",
"product": "html/template",
"programRoutines": [
{
"name": "jsValEscaper"
},
{
"name": "escaper.commit"
},
{
"name": "Template.Execute"
},
{
"name": "Template.ExecuteTemplate"
}
],
"vendor": "Go standard library",
"versions": [
{
"lessThan": "1.21.8",
"status": "affected",
"version": "0",
"versionType": "semver"
},
{
"lessThan": "1.22.1",
"status": "affected",
"version": "1.22.0-0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"value": "RyotaK (https://ryotak.net)"
}
],
"descriptions": [
{
"lang": "en",
"value": "If errors returned from MarshalJSON methods contain user controlled data, they may be used to break the contextual auto-escaping behavior of the html/template package, allowing for subsequent actions to inject unexpected content into templates."
}
],
"problemTypes": [
{
"descriptions": [
{
"description": "CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences",
"lang": "en"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2024-05-01T17:09:37.492Z",
"orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
"shortName": "Go"
},
"references": [
{
"url": "https://go.dev/issue/65697"
},
{
"url": "https://go.dev/cl/564196"
},
{
"url": "https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg"
},
{
"url": "https://pkg.go.dev/vuln/GO-2024-2610"
},
{
"url": "https://security.netapp.com/advisory/ntap-20240329-0008/"
},
{
"url": "http://www.openwall.com/lists/oss-security/2024/03/08/4"
}
],
"title": "Errors returned from JSON marshaling may break template escaping in html/template"
}
},
"cveMetadata": {
"assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
"assignerShortName": "Go",
"cveId": "CVE-2024-24785",
"datePublished": "2024-03-05T22:22:33.640Z",
"dateReserved": "2024-01-30T16:05:14.757Z",
"dateUpdated": "2025-03-14T00:55:26.398Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1"
}
}
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Loading…
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.
Loading…