Vulnerability · Published Jul 1, 2024 · Assigned by GitHub_M

CVE-2024-37298Potential memory exhaustion attack due to sparse slice deserialization

High 7.5

In plain English

A high-severity resource allocation without limits in schema from gorilla. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 66% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)1.1%top 34.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8aardvark-dns2:1.10.0-1.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8aardvark-dns2:1.10.0-1.module_el8.10.0+3792+03eaed9cALSA-2024:5258
AlmaLinux:8aardvark-dns2:1.10.0-1.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8buildah2:1.33.8-4.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8buildah-tests2:1.33.8-4.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8cockpit-podman84.1-1.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8conmon3:2.1.10-1.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8conmon3:2.1.10-1.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8conmon3:2.1.10-1.module_el8.10.0+3845+87b84552ALSA-2024:5258
AlmaLinux:8container-selinux2:2.229.0-2.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8containernetworking-plugins1:1.4.0-5.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8containers-common2:1-82.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8crit3.18-5.module_el8.10.0+3845+87b84552ALSA-2024:5258
AlmaLinux:8crit3.18-5.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8criu3.18-5.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8criu3.18-5.module_el8.10.0+3845+87b84552ALSA-2024:5258
AlmaLinux:8criu-devel3.18-5.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8criu-devel3.18-5.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8criu-libs3.18-5.module_el8.10.0+3845+87b84552ALSA-2024:5258
AlmaLinux:8criu-libs3.18-5.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8crun1.14.3-2.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8crun1.14.3-2.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8fuse-overlayfs1.13-1.module_el8.10.0+3859+6ae70a0eALSA-2024:5258
AlmaLinux:8fuse-overlayfs1.13-1.module_el8.10.0+3792+03eaed9cALSA-2024:5258
AlmaLinux:8libslirp4.4.0-2.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8libslirp4.4.0-2.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8libslirp-devel4.4.0-2.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8libslirp-devel4.4.0-2.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8netavark2:1.10.3-1.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8netavark2:1.10.3-1.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8oci-seccomp-bpf-hook1.2.10-1.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8oci-seccomp-bpf-hook1.2.10-1.module_el8.10.0+3792+03eaed9cALSA-2024:5258
AlmaLinux:8podman4:4.9.4-12.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:9podman4:4.9.4-10.el9_4ALSA-2024:6194
AlmaLinux:8podman-catatonit4:4.9.4-12.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8podman-docker4:4.9.4-12.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:9podman-docker4:4.9.4-10.el9_4ALSA-2024:6194
AlmaLinux:8podman-gvproxy4:4.9.4-12.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8podman-plugins4:4.9.4-12.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:9podman-plugins4:4.9.4-10.el9_4ALSA-2024:6194
AlmaLinux:8podman-remote4:4.9.4-12.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:9podman-remote4:4.9.4-10.el9_4ALSA-2024:6194
AlmaLinux:8podman-tests4:4.9.4-12.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:9podman-tests4:4.9.4-10.el9_4ALSA-2024:6194
AlmaLinux:8python3-criu3.18-5.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8python3-podman4.9.0-2.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8runc1:1.1.12-4.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8skopeo2:1.14.5-3.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8skopeo-tests2:1.14.5-3.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8slirp4netns1.2.3-1.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8slirp4netns1.2.3-1.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8slirp4netns1.2.3-1.module_el8.10.0+3845+87b84552ALSA-2024:5258
AlmaLinux:8toolbox0.0.99.5-2.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8toolbox0.0.99.5-2.module_el8.10.0+3845+87b84552ALSA-2024:5258
AlmaLinux:8toolbox0.0.99.5-2.module_el8.10.0+3876+e55593a8ALSA-2024:5258
AlmaLinux:8toolbox-tests0.0.99.5-2.module_el8.10.0+3845+87b84552ALSA-2024:5258
AlmaLinux:8toolbox-tests0.0.99.5-2.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
AlmaLinux:8udica0.2.6-21.module_el8.10.0+3858+6ad51f9fALSA-2024:5258
Debian:12golang-github-gorilla-schemano fix listedDEBIAN-CVE-2024-37298
Debian:13golang-github-gorilla-schema1.4.1-1DEBIAN-CVE-2024-37298
Debian:14golang-github-gorilla-schema1.4.1-1DEBIAN-CVE-2024-37298
Gogithub.com/gorilla/schema1.4.1GO-2024-2958
Gogithub.com/gorilla/schema1.4.1GHSA-3669-72x9-r9p3
Rocky Linux:8aardvark-dns2:1.10.0-1.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8buildah2:1.33.8-4.module+el8.10.0+1843+6892ab28RLSA-2024:5258
Rocky Linux:8cockpit-podman0:84.1-1.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8conmon3:2.1.10-1.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8container-selinux2:2.229.0-2.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8containernetworking-plugins1:1.4.0-5.module+el8.10.0+1843+6892ab28RLSA-2024:5258
Rocky Linux:8containers-common2:1-82.module+el8.10.0+1843+6892ab28RLSA-2024:5258
Rocky Linux:8criu0:3.18-5.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8crun0:1.14.3-2.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8fuse-overlayfs0:1.13-1.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8libslirp0:4.4.0-2.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8netavark2:1.10.3-1.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8oci-seccomp-bpf-hook0:1.2.10-1.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8podman4:4.9.4-12.module+el8.10.0+1843+6892ab28RLSA-2024:5258
Rocky Linux:8python-podman0:4.9.0-2.module+el8.10.0+1843+6892ab28RLSA-2024:5258
Rocky Linux:8runc1:1.1.12-4.module+el8.10.0+1843+6892ab28RLSA-2024:5258
Rocky Linux:8skopeo2:1.14.5-3.module+el8.10.0+1843+6892ab28RLSA-2024:5258
Rocky Linux:8slirp4netns0:1.2.3-1.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Rocky Linux:8toolbox0:0.0.99.5-2.module+el8.10.0+1815+5fe7415e.rocky.0.2.rocky.0.2RLSA-2024:5258
Rocky Linux:8udica0:0.2.6-21.module+el8.10.0+1815+5fe7415eRLSA-2024:5258
Ubuntu:24.04:LTSgolang-github-gorilla-schemano fix listedUBUNTU-CVE-2024-37298
Ubuntu:25.10golang-github-gorilla-schemano fix listedUBUNTU-CVE-2024-37298
Ubuntu:26.04:LTSgolang-github-gorilla-schemano fix listedUBUNTU-CVE-2024-37298
Ubuntu:26.10golang-github-gorilla-schemano fix listedUBUNTU-CVE-2024-37298

Affected products (as reported)

VendorProductVersions
gorilla schema < 1.4.1

Weakness: CWE-770 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References