CVE-2024-37298gorilla schema
High 7.5 No auth needed
Follow: this CVE · gorilla · gorilla schema We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 1.4% probability of exploitation in 30 days · percentile 72
- Auth required
- No
- Published
- Jul 1, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-770
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for schema.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/gorilla/schema |
< 1.4.1 |
1.4.1 |
go get github.com/gorilla/schema@v1.4.1 |
| Go | github.com/gorilla/schema |
< 1.4.1 |
1.4.1 |
go get github.com/gorilla/schema@v1.4.1 |
Per OSV / GitHub Advisories (GHSA-3669-72x9-r9p3, GO-2024-2958). Check the version in your lockfile before upgrading.
Affected products
- gorilla · schema
- gorillatoolkit · schema
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.