What’s Vulnerable › Vulnerabilities
CVE-2024-37298: Potential memory exhaustion attack due to sparse slice deserialization
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.1% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-07-01 · updated 2026-06-17
- Weakness: CWE-770
Description
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.
Affected products
- Gorillatoolkit Schema: before 1.4.1 — fixed in 1.4.1
How to fix
Upgrade to a fixed version: Gorillatoolkit Schema 1.4.1. Check the vendor advisory for mitigations.
References
- https://github.com/gorilla/schema/blob/main/decoder.go#L223
- https://github.com/gorilla/schema/commit/cd59f2f12cbdfa9c06aa63e425d1fe4a806967ff
- https://github.com/gorilla/schema/security/advisories/GHSA-3669-72x9-r9p3
- https://github.com/gorilla/schema/blob/main/decoder.go#L223
- https://github.com/gorilla/schema/commit/cd59f2f12cbdfa9c06aa63e425d1fe4a806967ff
- https://github.com/gorilla/schema/security/advisories/GHSA-3669-72x9-r9p3
Get alerted when CVE-2024-37298 or the next vulnerability affects your stack