Cloudanix VulnDB

CVE-2024-24786

High · 7.5

CVSS

7.5

EPSS

1.3%

Published

Mar 5, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A programming mistake lets attackers send specially crafted data that can freeze certain applications, making them stop responding to users until restarted.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

protojson.Unmarshal enters an infinite loop on specific invalid JSON when targeting google.protobuf.Any fields or when UnmarshalOptions.DiscardUnknown is enabled, consuming CPU and blocking the goroutine.

Why it matters to the business

Services that accept untrusted JSON can be rendered unresponsive, causing outages, delayed processing, and increased operational load until the affected process is restarted.

How an attack unfolds

An attacker identifies an HTTP or gRPC endpoint that uses protojson.Unmarshal on attacker-controlled JSON, crafts a minimal invalid payload that triggers the Any or DiscardUnknown code path, and repeatedly sends the payload to exhaust worker threads or CPU capacity.

How to fix it

Upgrade the golang.org/x/protobuf and google.golang.org/protobuf modules to versions containing the corrected Unmarshal implementation; rebuild and redeploy all affected binaries.

How to confirm the fix worked

Execute unit tests that feed the previously triggering JSON payloads into protojson.Unmarshal under both Any and DiscardUnknown configurations and confirm termination within expected time bounds; scan go.mod files for updated module versions.

Typical attack path

  1. Locate service entry points that invoke protojson.Unmarshal on JSON input
  2. Generate invalid JSON that exercises google.protobuf.Any or DiscardUnknown paths
  3. Transmit the payload via network request or message queue
  4. Observe sustained high CPU or goroutine blockage confirming the loop

How to detect it

Search application and system logs for repeated entries showing JSON unmarshal calls with no completion, correlate with process CPU or goroutine profiles showing blocked threads in protojson code paths.

What your security team should do

  • Inventory all Go services importing protojson and schedule upgrades
  • Add request timeouts and resource limits around unmarshal calls pending the patch
  • Monitor for sustained high CPU on services handling JSON/protobuf traffic

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Go google.golang.org/protobuf 0 1.33.0
Go google.golang.org/protobuf/encoding/protojson 0 1.33.0
Go google.golang.org/protobuf/internal/encoding/json 0 1.33.0
AlmaLinux:8 aardvark-dns 0 2:1.10.0-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 aardvark-dns 0 2:1.10.0-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 buildah 0 2:1.33.7-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 buildah 0 2:1.33.8-1.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 buildah-tests 0 2:1.33.7-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 buildah-tests 0 2:1.33.8-1.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 cockpit-podman 0 84.1-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 cockpit-podman 0 84.1-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 conmon 0 3:2.1.10-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 conmon 0 3:2.1.10-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 container-selinux 0 2:2.229.0-2.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 container-selinux 0 2:2.229.0-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 containernetworking-plugins 0 1:1.4.0-2.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 containernetworking-plugins 0 1:1.4.0-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 containers-common 0 2:1-81.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 containers-common 0 2:1-81.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 crit 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 crit 0 3.18-5.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 criu 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 criu 0 3.18-5.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 criu-devel 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 criu-devel 0 3.18-5.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 criu-libs 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 crun 0 1.14.3-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 crun 0 1.14.3-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 fuse-overlayfs 0 1.13-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 fuse-overlayfs 0 1.13-1.module_el8.10.0+3859+6ae70a0e
AlmaLinux:8 libslirp 0 4.4.0-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 libslirp 0 4.4.0-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 libslirp-devel 0 4.4.0-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 libslirp-devel 0 4.4.0-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 netavark 0 2:1.10.3-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 netavark 0 2:1.10.3-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 oci-seccomp-bpf-hook 0 1.2.10-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 oci-seccomp-bpf-hook 0 1.2.10-1.module_el8.10.0+3859+6ae70a0e
AlmaLinux:8 podman 0 4:4.9.4-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 podman 0 4:4.9.4-4.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 podman-catatonit 0 4:4.9.4-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 podman-catatonit 0 4:4.9.4-4.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 podman-docker 0 4:4.9.4-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 podman-docker 0 4:4.9.4-4.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 podman-gvproxy 0 4:4.9.4-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 podman-gvproxy 0 4:4.9.4-4.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 podman-plugins 0 4:4.9.4-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 podman-plugins 0 4:4.9.4-4.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 podman-remote 0 4:4.9.4-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 podman-remote 0 4:4.9.4-4.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 podman-tests 0 4:4.9.4-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 podman-tests 0 4:4.9.4-4.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 python3-criu 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 python3-criu 0 3.18-5.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 python3-podman 0 4.9.0-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 runc 0 1:1.1.12-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 runc 0 1:1.1.12-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 skopeo 0 2:1.14.3-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 skopeo 0 2:1.14.4-1.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 skopeo-tests 0 2:1.14.3-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 skopeo-tests 0 2:1.14.4-1.module_el8.10.0+3862+c5a22a8d
AlmaLinux:8 slirp4netns 0 1.2.3-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 slirp4netns 0 1.2.3-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 toolbox 0 0.0.99.5-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 toolbox 0 0.0.99.5-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 toolbox-tests 0 0.0.99.5-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 toolbox-tests 0 0.0.99.5-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 udica 0 0.2.6-21.module_el8.10.0+3845+87b84552
AlmaLinux:8 udica 0 0.2.6-21.module_el8.10.0+3858+6ad51f9f
AlmaLinux:9 buildah 0 2:1.33.7-1.el9_4
AlmaLinux:9 buildah-tests 0 2:1.33.7-1.el9_4
AlmaLinux:9 podman 0 4:4.9.4-3.el9_4
AlmaLinux:9 podman-docker 0 4:4.9.4-3.el9_4
AlmaLinux:9 podman-plugins 0 4:4.9.4-3.el9_4
AlmaLinux:9 podman-remote 0 4:4.9.4-3.el9_4
AlmaLinux:9 podman-tests 0 4:4.9.4-3.el9_4
AlmaLinux:9 skopeo 0 2:1.14.3-2.el9_4
AlmaLinux:9 skopeo-tests 0 2:1.14.3-2.el9_4
Chainguard aactl 0 0.4.12-r8
Chainguard actions-runner-controller 0 0.8.3-r2
Chainguard actions-runner-controller-compat 0 0.8.3-r2
Chainguard amass 0 4.2.0-r8
Chainguard apisix-ingress-controller 0 1.8.4-r7
Chainguard apisix-ingress-controller 0 2.0.1-r1
Chainguard apisix-ingress-controller 0 2.0.1-r2
Chainguard apisix-ingress-controller-compat 0 1.8.4-r4
Chainguard apisix-ingress-controller-iamguarded-compat 0 1.8.4-r7
Chainguard argo-cd-2.10 0 2.10.3-r1
Chainguard argo-cd-2.10-compat 0 2.10.3-r1
Chainguard argo-cd-2.10-repo-server 0 2.10.3-r1
Chainguard argo-cd-2.7 0 2.7.17-r4
Chainguard argo-cd-2.8 0 2.8.12-r1
Chainguard argo-cd-2.8-compat 0 2.8.12-r1
Chainguard argo-cd-2.8-repo-server 0 2.8.12-r1
Chainguard argo-cd-2.9 0 2.9.10-r0
Chainguard argo-cd-2.9-compat 0 2.9.10-r0
Chainguard argo-cd-2.9-repo-server 0 2.9.10-r0
Chainguard argo-cd-fips-2.10 0 2.10.3-r1
Chainguard argo-cd-fips-2.10-compat 0 2.10.3-r1
Chainguard argo-cd-fips-2.10-repo-server 0 2.10.3-r1
Chainguard argo-cd-fips-2.9 0 2.9.9-r0
Chainguard argo-cd-fips-2.9-compat 0 2.9.9-r0
Chainguard argo-cd-fips-2.9-repo-server 0 2.9.9-r0
Chainguard argo-workflow-cli 0 3.5.5-r4
Chainguard argo-workflow-cli-fips 0 3.5.5-r2
Chainguard argo-workflow-controller 0 3.5.5-r4
Chainguard argo-workflow-controller-compat 0 3.5.5-r4
Chainguard argo-workflow-controller-compat-fips 0 3.5.5-r2
Chainguard argo-workflow-controller-fips 0 3.5.5-r2
Chainguard argo-workflow-executor 0 3.5.5-r4
Chainguard argo-workflow-executor-compat 0 3.5.5-r4
Chainguard argo-workflow-executor-compat-fips 0 3.5.5-r2
Chainguard argo-workflow-executor-fips 0 3.5.5-r2
Chainguard argo-workflows 0 3.5.5-r4
Chainguard argo-workflows-fips 0 3.5.5-r2
Chainguard argo-workflows-known-hosts 0 3.5.5-r4
Chainguard argo-workflows-known-hosts-fips 0 3.5.5-r2
Chainguard argo-workflows-ui 0 3.5.5-r4
Chainguard atlantis 0 0.27.2-r1
Chainguard atlantis-fips 0 0.27.2-r1
Chainguard aws-ebs-csi-driver 0 1.28.0-r2
Chainguard aws-ebs-csi-driver-1.18 0 1.18.0-r12
Chainguard aws-ebs-csi-driver-1.19 0 1.19.0-r12
Chainguard aws-ebs-csi-driver-fips 0 1.28.0-r2
Chainguard aws-efs-csi-driver 0 1.7.6-r2
Chainguard aws-efs-csi-driver-fips 0 1.7.0-r5
Chainguard aws-efs-csi-driver-fips-1.6 0 1.6.0-r5
Chainguard aws-flb-kinesis 0 1.10.2-r8
Chainguard aws-flb-kinesis-compat 0 1.10.2-r8
Chainguard aws-flb-kinesis-compat-fips 0 1.10.2-r1
Chainguard aws-flb-kinesis-fips 0 1.10.2-r1
Chainguard aws-load-balancer-controller 0 2.7.1-r2
Chainguard aws-load-balancer-controller-2.4.5 0 2.4.5-r8
Chainguard aws-load-balancer-controller-2.5 0 2.5.4-r3
Chainguard aws-load-balancer-controller-compat 0 2.7.1-r2
Chainguard aws-load-balancer-controller-compat-2.4.5 0 2.5.4-r3
Chainguard aws-load-balancer-controller-fips 0 2.7.1-r2
Chainguard azure-aad-pod-identity-mic 0 1.8.17-r6
Chainguard azure-aad-pod-identity-nmi 0 1.8.17-r6
Chainguard bank-vaults 0 1.20.4-r10
Chainguard bank-vaults-fips 0 1.20.4-r6
Chainguard bank-vaults-template 0 1.20.4-r10
Chainguard bank-vaults-template-fips 0 1.20.4-r6
Chainguard boring-registry 0 0.13.2-r3
Chainguard boring-registry-fips 0 0.13.2-r2
Chainguard buf 0 1.30.0-r0
Chainguard buildctl 0 0.13.0-r1
Chainguard buildkitd 0 0.13.0-r1
Chainguard caddy 0 2.7.6-r4
Chainguard caddy-fips 0 2.7.6-r1
Chainguard caddy-man 0 2.7.6-r4
Chainguard caddy-man 0 2.7.6-r1
Chainguard caddy-src 0 2.7.6-r4
Chainguard cadvisor 0 0.49.1-r3
Chainguard cadvisor-compat 0 0.49.1-r3
Chainguard calico 0 3.27.2-r3
Chainguard calico-apiserver 0 3.27.2-r3
Chainguard calico-app-policy 0 3.27.2-r3
Chainguard calico-cni 0 3.27.2-r3
Chainguard calico-cni-compat 0 3.27.2-r3
Chainguard calico-cni-fips-3.25-compat 0 3.25.2-r5
Chainguard calico-cni-fips-compat 0 3.27.2-r2
Chainguard calico-felix 0 3.27.2-r3
Chainguard calico-fips 0 3.27.2-r2
Chainguard calico-fips-3.25 0 3.25.2-r5
Chainguard calico-fips-apiserver 0 3.27.2-r2
Chainguard calico-fips-apiserver-3.25 0 3.25.2-r5
Chainguard calico-fips-app-policy 0 3.27.2-r2
Chainguard calico-fips-app-policy-3.25 0 3.25.2-r5
Chainguard calico-fips-cni 0 3.27.2-r2
Chainguard calico-fips-cni-3.25 0 3.25.2-r5
Chainguard calico-fips-felix 0 3.27.2-r2
Chainguard calico-fips-felix-3.25 0 3.25.2-r5
Chainguard calico-fips-key-cert-provisioner 0 3.27.2-r2
Chainguard calico-fips-kube-controllers 0 3.27.2-r2
Chainguard calico-fips-kube-controllers-3.25 0 3.25.2-r5
Chainguard calico-fips-node 0 3.27.2-r2
Chainguard calico-fips-node-3.25 0 3.25.2-r5
Chainguard calico-fips-pod2daemon 0 3.27.2-r2
Chainguard calico-fips-pod2daemon-3.25 0 3.25.2-r5
Chainguard calico-fips-typha-client 0 3.27.2-r2
Chainguard calico-fips-typha-client-3.25 0 3.25.2-r5
Chainguard calico-fips-typhad 0 3.27.2-r2
Chainguard calico-fips-typhad-3.25 0 3.25.2-r5
Chainguard calico-key-cert-provisioner 0 3.27.2-r3
Chainguard calico-kube-controllers 0 3.27.2-r3
Chainguard calico-node 0 3.27.2-r3
Chainguard calico-pod2daemon 0 3.27.2-r3
Chainguard calico-pod2daemon-flexvol-compat 0 3.27.2-r3
Chainguard calico-typha-client 0 3.27.2-r3
Chainguard calico-typhad 0 3.27.2-r3
Chainguard calicoctl 0 3.27.2-r3
Chainguard calicoctl-fips 0 3.27.2-r2
Chainguard calicoctl-fips-3.25 0 3.25.2-r5
Chainguard capslock 0 0.2.2-r0
Chainguard cass-operator 0 1.18.2-r5
Chainguard cass-operator-compat 0 1.18.2-r5
Chainguard cass-operator-compat-fips 0 1.18.2-r4
Chainguard cass-operator-config 0 1.18.2-r5
Chainguard cass-operator-fips 0 1.18.2-r4

Related vulnerabilities