data/reports: add GO-2024-2610.yaml
Aliases: CVE-2024-24785
Updates golang/vulndb#2610
Change-Id: I6b78f5c9c760f98232f0efe7368395e73f753b9a
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/569419
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Tatiana Bradley <tatianabradley@google.com>
diff --git a/data/cve/v5/GO-2024-2610.json b/data/cve/v5/GO-2024-2610.json
new file mode 100644
index 0000000..6eeda00
--- /dev/null
+++ b/data/cve/v5/GO-2024-2610.json
@@ -0,0 +1,88 @@
+{
+ "dataType": "CVE_RECORD",
+ "dataVersion": "5.0",
+ "cveMetadata": {
+ "cveId": "CVE-2024-24785"
+ },
+ "containers": {
+ "cna": {
+ "providerMetadata": {
+ "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc"
+ },
+ "title": "Errors returned from JSON marshaling may break template escaping in html/template",
+ "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."
+ }
+ ],
+ "affected": [
+ {
+ "vendor": "Go standard library",
+ "product": "html/template",
+ "collectionURL": "https://pkg.go.dev",
+ "packageName": "html/template",
+ "versions": [
+ {
+ "version": "0",
+ "lessThan": "1.21.8",
+ "status": "affected",
+ "versionType": "semver"
+ },
+ {
+ "version": "1.22.0-0",
+ "lessThan": "1.22.1",
+ "status": "affected",
+ "versionType": "semver"
+ }
+ ],
+ "programRoutines": [
+ {
+ "name": "jsValEscaper"
+ },
+ {
+ "name": "escaper.commit"
+ },
+ {
+ "name": "Template.Execute"
+ },
+ {
+ "name": "Template.ExecuteTemplate"
+ }
+ ],
+ "defaultStatus": "unaffected"
+ }
+ ],
+ "problemTypes": [
+ {
+ "descriptions": [
+ {
+ "lang": "en",
+ "description": "CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences"
+ }
+ ]
+ }
+ ],
+ "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"
+ }
+ ],
+ "credits": [
+ {
+ "lang": "en",
+ "value": "RyotaK (https://ryotak.net)"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/data/osv/GO-2024-2610.json b/data/osv/GO-2024-2610.json
new file mode 100644
index 0000000..325b53e
--- /dev/null
+++ b/data/osv/GO-2024-2610.json
@@ -0,0 +1,73 @@
+{
+ "schema_version": "1.3.1",
+ "id": "GO-2024-2610",
+ "modified": "0001-01-01T00:00:00Z",
+ "published": "0001-01-01T00:00:00Z",
+ "aliases": [
+ "CVE-2024-24785"
+ ],
+ "summary": "Errors returned from JSON marshaling may break template escaping in html/template",
+ "details": "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.",
+ "affected": [
+ {
+ "package": {
+ "name": "stdlib",
+ "ecosystem": "Go"
+ },
+ "ranges": [
+ {
+ "type": "SEMVER",
+ "events": [
+ {
+ "introduced": "0"
+ },
+ {
+ "fixed": "1.21.8"
+ },
+ {
+ "introduced": "1.22.0-0"
+ },
+ {
+ "fixed": "1.22.1"
+ }
+ ]
+ }
+ ],
+ "ecosystem_specific": {
+ "imports": [
+ {
+ "path": "html/template",
+ "symbols": [
+ "Template.Execute",
+ "Template.ExecuteTemplate",
+ "escaper.commit",
+ "jsValEscaper"
+ ]
+ }
+ ]
+ }
+ }
+ ],
+ "references": [
+ {
+ "type": "REPORT",
+ "url": "https://go.dev/issue/65697"
+ },
+ {
+ "type": "FIX",
+ "url": "https://go.dev/cl/564196"
+ },
+ {
+ "type": "WEB",
+ "url": "https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg"
+ }
+ ],
+ "credits": [
+ {
+ "name": "RyotaK (https://ryotak.net)"
+ }
+ ],
+ "database_specific": {
+ "url": "https://pkg.go.dev/vuln/GO-2024-2610"
+ }
+}
\ No newline at end of file
diff --git a/data/reports/GO-2024-2610.yaml b/data/reports/GO-2024-2610.yaml
new file mode 100644
index 0000000..c056f0e
--- /dev/null
+++ b/data/reports/GO-2024-2610.yaml
@@ -0,0 +1,33 @@
+id: GO-2024-2610
+modules:
+ - module: std
+ versions:
+ - fixed: 1.21.8
+ - introduced: 1.22.0-0
+ fixed: 1.22.1
+ vulnerable_at: 1.22.0
+ packages:
+ - package: html/template
+ symbols:
+ - jsValEscaper
+ - escaper.commit
+ derived_symbols:
+ - Template.Execute
+ - Template.ExecuteTemplate
+summary: |-
+ Errors returned from JSON marshaling may break template escaping in
+ html/template
+description: |-
+ 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.
+credits:
+ - RyotaK (https://ryotak.net)
+references:
+ - report: https://go.dev/issue/65697
+ - fix: https://go.dev/cl/564196
+ - web: https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg
+cve_metadata:
+ id: CVE-2024-24785
+ cwe: 'CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences'