CVE-2024-24786 is a high-severity (CVSS 7.5) vulnerability in google.golang.org/protobuf. A fix is available for google.golang.org/protobuf — see the affected versions and patch details below.
Golang protojson.Unmarshal function infinite loop when unmarshaling certain forms of invalid JSON
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-24786.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
google.golang.org/protobuf🐹google.golang.org/protobuf/encoding/protojson🐹google.golang.org/protobuf/internal/encoding/jsonReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | google.golang.org/protobuf | all versions | 1.33.0go get google.golang.org/protobuf@v1.33.0 |
| 🐹Go | google.golang.org/protobuf/encoding/protojson | all versions | 1.33.0go get google.golang.org/protobuf/encoding/protojson@v1.33.0 |
| 🐹Go | google.golang.org/protobuf/internal/encoding/json | all versions | 1.33.0go get google.golang.org/protobuf/internal/encoding/json@v1.33.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for google.golang.org/protobuf, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update google.golang.org/protobuf to 1.33.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-24786 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability is rated as Moderate impact because exploitation is restricted to denial of service via excessive CPU and thread consumption, without compromising data confidentiality or system integrity. Red Hat services and containerized components are only exposed if they process untrusted JSON inputs into…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2024-24786 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Builds for Red Hat OpenShift | openshift-builds-operator-container | RHSA-2024:6221 |
| CLUSTER-OBSERVABILITY-OPERATOR-0.4-RHEL-8 | cluster-observability-operator/cluster-observability-operator-bundle:0.4.1-18 | RHSA-2024:8040 |
| KDO-5.0-RHEL-9 | kube-descheduler-operator/descheduler-rhel9:v5.0-31 | RHSA-2024:3617 |
| KDO-5.0-RHEL-9 | kube-descheduler-operator/descheduler-rhel9:v5.0-45 | RHSA-2024:8704 |
| LVMS-4.14-RHEL-9 | lvms4/lvms-must-gather-rhel9:v4.14.10-3 | RHBA-2024:8194 |
| LVMS-4.15-RHEL-9 | lvms4/lvms-must-gather-rhel9:v4.15.8-3 | RHBA-2024:8188 |
| MTA-7.0-RHEL-9 | mta/mta-analyzer-addon-rhel9:7.0.3-13 | RHSA-2024:3316 |
| NETWORK-OBSERVABILITY-1.6.0-RHEL-9 | network-observability/network-observability-cli-rhel9:v1.6.0-66 | RHSA-2024:3868 |
Frequently Asked Questions
Is CVE-2024-24786 in your dependencies?
Find it across Go, including transitive dependencies.