CVE-2024-24786 Infinite loop in JSON unmarshaling in google.golang.org/protobuf
Attackers can cause a denial of service via infinite loop in JSON unmarshaling when using specific options or message types.
- 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-24786?
CVE-2024-24786 is a high-severity denial of service vulnerability in google.golang.org/protobuf/encoding/protojson, published on 5 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The protojson.Unmarshal function can enter an infinite loop when unmarshaling certain forms of invalid JSON. This condition can occur when unmarshaling into a message which contains a google.protobuf.Any value, or when the UnmarshalOptions.DiscardUnknown option is set.
Which versions are affected by CVE-2024-24786?
7 open source packages ship an affected version, including google.golang.org/protobuf/encoding/protojson, google.golang.org/protobuf and google.golang.org/protobuf/internal/encoding/json.
| Package | Affected | Fixed in |
|---|---|---|
google.golang.org/protobuf/encoding/protojson Go | All versions | 1.33.0 |
google.golang.org/protobuf/encoding/protojson Go | All versions | 1.33.0 |
google.golang.org/protobuf Go | All versions | 1.33.0 |
google.golang.org/protobuf Go | All versions | 1.33.0 |
google.golang.org/protobuf Go | All versions | 1.33.0 |
google.golang.org/protobuf/internal/encoding/json Go | All versions | 1.33.0 |
1 more packages
google.golang.org/protobuf/internal/encoding/json Go | All versions | 1.33.0 |
Linux distribution packages (33)
aardvark-dns AlmaLinux:8 | All versions | 2:1.10.0-1.module_el8.10.0+3792+03eaed9c |
aardvark-dns AlmaLinux:8 | All versions | 2:1.10.0-1.module_el8.10.0+3858+6ad51f9f |
buildah AlmaLinux:8 | All versions | 2:1.33.8-1.module_el8.10.0+3862+c5a22a8d |
buildah-tests AlmaLinux:8 | All versions | 2:1.33.8-1.module_el8.10.0+3862+c5a22a8d |
cockpit-podman AlmaLinux:8 | All versions | 84.1-1.module_el8.10.0+3858+6ad51f9f |
conmon AlmaLinux:8 | All versions | 3:2.1.10-1.module_el8.10.0+3845+87b84552 |
conmon AlmaLinux:8 | All versions | 3:2.1.10-1.module_el8.10.0+3858+6ad51f9f |
container-selinux AlmaLinux:8 | All versions | 2:2.229.0-2.module_el8.10.0+3858+6ad51f9f |
containernetworking-plugins AlmaLinux:8 | All versions | 1:1.4.0-2.module_el8.10.0+3792+03eaed9c |
containernetworking-plugins AlmaLinux:8 | All versions | 1:1.4.0-2.module_el8.10.0+3858+6ad51f9f |
containers-common AlmaLinux:8 | All versions | 2:1-81.module_el8.10.0+3792+03eaed9c |
containers-common AlmaLinux:8 | All versions | 2:1-81.module_el8.10.0+3858+6ad51f9f |
crit AlmaLinux:8 | All versions | 3.18-5.module_el8.10.0+3845+87b84552 |
crit AlmaLinux:8 | All versions | 3.18-5.module_el8.10.0+3858+6ad51f9f |
criu AlmaLinux:8 | All versions | 3.18-5.module_el8.10.0+3845+87b84552 |
criu AlmaLinux:8 | All versions | 3.18-5.module_el8.10.0+3858+6ad51f9f |
criu-devel AlmaLinux:8 | All versions | 3.18-5.module_el8.10.0+3858+6ad51f9f |
criu-libs AlmaLinux:8 | All versions | 3.18-5.module_el8.10.0+3845+87b84552 |
crun AlmaLinux:8 | All versions | 1.14.3-2.module_el8.10.0+3845+87b84552 |
crun AlmaLinux:8 | All versions | 1.14.3-2.module_el8.10.0+3858+6ad51f9f |
fuse-overlayfs AlmaLinux:8 | All versions | 1.13-1.module_el8.10.0+3792+03eaed9c |
fuse-overlayfs AlmaLinux:8 | All versions | 1.13-1.module_el8.10.0+3859+6ae70a0e |
libslirp AlmaLinux:8 | All versions | 4.4.0-2.module_el8.10.0+3845+87b84552 |
libslirp AlmaLinux:8 | All versions | 4.4.0-2.module_el8.10.0+3858+6ad51f9f |
libslirp-devel AlmaLinux:8 | All versions | 4.4.0-2.module_el8.10.0+3845+87b84552 |
libslirp-devel AlmaLinux:8 | All versions | 4.4.0-2.module_el8.10.0+3858+6ad51f9f |
netavark AlmaLinux:8 | All versions | 2:1.10.3-1.module_el8.10.0+3845+87b84552 |
netavark AlmaLinux:8 | All versions | 2:1.10.3-1.module_el8.10.0+3858+6ad51f9f |
oci-seccomp-bpf-hook AlmaLinux:8 | All versions | 1.2.10-1.module_el8.10.0+3792+03eaed9c |
oci-seccomp-bpf-hook AlmaLinux:8 | All versions | 1.2.10-1.module_el8.10.0+3859+6ae70a0e |
podman AlmaLinux:8 | All versions | 4:4.9.4-4.module_el8.10.0+3862+c5a22a8d |
podman-catatonit AlmaLinux:8 | All versions | 4:4.9.4-4.module_el8.10.0+3862+c5a22a8d |
podman-docker AlmaLinux:8 | All versions | 4:4.9.4-4.module_el8.10.0+3862+c5a22a8d |
How do I fix CVE-2024-24786?
Upgrade google.golang.org/protobuf/encoding/protojson to 1.33.0 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-24786 being exploited?
There is no known exploitation of CVE-2024-24786 in the wild and no public exploit code.
Sources
Also known as ALSA-2024:2550, ALSA-2024:4246, AZL-35551, AZL-35554, AZL-35556, AZL-35558 and 126 more.