{"id":"CVE-2024-37298","summary":"Potential memory exhaustion attack due to sparse slice deserialization","details":"gorilla/schema converts structs to and from form values. Prior to version 1.4.1 Running `schema.Decoder.Decode()` on a struct that has a field of type `[]struct{...}` opens it up to malicious attacks regarding memory allocations, taking advantage of the sparse slice functionality. Any use of `schema.Decoder.Decode()` on a struct with arrays of other structs could be vulnerable to this memory exhaustion vulnerability. Version 1.4.1 contains a patch for the issue.","aliases":["GHSA-3669-72x9-r9p3","GO-2024-2958"],"modified":"2026-04-16T04:13:28.498445Z","published":"2024-07-01T18:27:33.952Z","related":["ALSA-2024:5258","ALSA-2024:6194","CGA-c6pm-6625-xr6w","openSUSE-SU-2025:14663-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/37xxx/CVE-2024-37298.json","cwe_ids":["CWE-770"],"cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/gorilla/schema/blob/main/decoder.go#L223"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/37xxx/CVE-2024-37298.json"},{"type":"ADVISORY","url":"https://github.com/gorilla/schema/security/advisories/GHSA-3669-72x9-r9p3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-37298"},{"type":"FIX","url":"https://github.com/gorilla/schema/commit/cd59f2f12cbdfa9c06aa63e425d1fe4a806967ff"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/gorilla/schema","events":[{"introduced":"0"},{"fixed":"cd59f2f12cbdfa9c06aa63e425d1fe4a806967ff"}]},{"type":"GIT","repo":"https://github.com/gorilla/schema","events":[{"introduced":"0"},{"fixed":"cd59f2f12cbdfa9c06aa63e425d1fe4a806967ff"}]}],"versions":["v1.0.1","v1.0.2","v1.1.0","v1.2.0","v1.2.1","v1.3.0","v1.4.0"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-37298.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}