cve.bz

CVE-2026-54902 ohler55 oj: Use After Free

6.3 mediumEPSS 0.5%Fix available

Medium (6.3) in ohler55 oj. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in oj 3.17.3.

On this page
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. Prior to version 3.17.2, is vulnerable to Use-After-Free when in SAJ mode. The Oj::Parser does not protect cached object keys (≥ 35 bytes) from garbage collection, and a Ruby callback that triggers GC inside hash_end can cause the key string to be reclaimed while the C parser still holds a pointer to it. The subsequent access to the freed string VALUE results in a segfault, confirmed by an RIP pointing to address 0x4242 (a canary-style pattern suggesting control over the freed memory's content). This issue has been fixed in version 3.17.2.

Severity

CVSS 4.0

6.3 medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
EPSS
0.5% (unchanged from 0.5% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 44th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2026-07-01. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-54902 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-54902?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-54902?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-54902 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
ohler55 oj< 3.17.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-m578-w5vf-rfcmRubyGemsoj<3.17.33.17.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12ruby-oj3.14.2-1+deb12u1DEBIAN-CVE-2026-54902 DLA-4803-1
Debian13ruby-oj3.16.3-1+deb13u1DEBIAN-CVE-2026-54902 DSA-6521-1
Debian14ruby-oj3.17.6-2DEBIAN-CVE-2026-54902
Ubuntu14.04:LTS, 16.04:LTS, 18.04:LTS and 6 moreruby-ojno fix listedUBUNTU-CVE-2026-54902

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat's only product shipping the Oj Ruby gem (Compliance Backend) already includes version 3.17.3, which contains the fix for this vulnerability. No Red Hat products are affected.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-54902.

References

Check your stackJSON