CVE-2024-37298 Potential memory exhaustion attack due to sparse slice deserialization
Attackers can cause memory exhaustion and denial of service by exploiting sparse slice deserialization in the gorilla/schema library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-37298?
CVE-2024-37298 is a high-severity denial of service vulnerability in gorilla schema, published on 1 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-770
Which versions are affected by CVE-2024-37298?
3 open source packages ship an affected version, including github.com/gorilla/schema.
| Package | Affected | Fixed in |
|---|---|---|
github.com/gorilla/schema Go | All versions | 1.4.1 |
github.com/gorilla/schema Go | All versions | 1.4.1 |
github.com/gorilla/schema Go | All versions | 1.4.1 |
Linux distribution packages (37)
podman Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-catatonit Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-catatonit-debuginfo Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-debuginfo Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-debugsource Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-docker Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-gvproxy Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-gvproxy-debuginfo Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-plugins Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-plugins-debuginfo Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-remote Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-remote-debuginfo Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman-tests Red Hat:openshift:4.13::el8 | All versions | 3:4.4.1-9.3.rhaos4.13.el8 |
podman Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman-debuginfo Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman-debugsource Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman-docker Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman-gvproxy Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman-gvproxy-debuginfo Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman-plugins Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman-plugins-debuginfo Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman-remote Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman-remote-debuginfo Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman-tests Red Hat:openshift:4.13::el9 | All versions | 3:4.4.1-10.3.rhaos4.13.el9 |
podman Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-catatonit Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-catatonit-debuginfo Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-debuginfo Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-debugsource Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-docker Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-gvproxy Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-gvproxy-debuginfo Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-plugins Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-plugins-debuginfo Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-remote Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-remote-debuginfo Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
podman-tests Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-25.2.rhaos4.15.el8 |
How do I fix CVE-2024-37298?
Upgrade github.com/gorilla/schema to 1.4.1 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-37298 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-37298 exists.
Sources
Also known as AZL-43071, AZL-43083, AZL-43103, AZL-43146, AZL-43474, AZL-44949 and 7 more.