{
  "id": "cve-2026-54902",
  "title": "Oj SAJ parser use-after-free for long object keys",
  "product": "Oj",
  "ai_system": "depthfirst AI security agents (specific model not identified for this Ruby research)",
  "organization": "depthfirst / respective project maintainers",
  "summary": "In SAJ mode, a Ruby callback that triggers garbage collection can reclaim a long key string while Oj’s native parser still retains the Ruby VALUE, resulting in access through a stale reference and a segfault.",
  "ai_role": "depthfirst’s primary July 27, 2026 Ruby ecosystem report identifies CVE-2026-54902 as an issue uncovered in the research, and says its AI security agents analyzed the projects and validated each finding with a triggering input, reproduction script and evidence such as ASan output before manual review. The issue-specific section describes this exact vulnerability. The affected project maintainer advisory validates the vulnerability and fix. No specific model or per-case human/agent split is stated.",
  "disclosure_date": "2026-06-30",
  "ai_attribution_date": "2026-07-27",
  "classification": "disclosure",
  "classification_note": "The maintainer advisory and CNA record provide public dates for CVE-2026-54902; the depthfirst account is dated 2026-07-27. The sources do not report exploitation in the wild or establish zero-day status.",
  "cves": [
    "CVE-2026-54902"
  ],
  "source_url": "https://github.com/ohler55/oj/security/advisories/GHSA-m578-w5vf-rfcm",
  "ai_source_url": "https://depthfirst.com/research/behind-the-gitlab-rce-a-depthfirst-journey-into-the-ruby-ecosystem",
  "advisory_url": "https://github.com/ohler55/oj/security/advisories/GHSA-m578-w5vf-rfcm",
  "remediation": "fix documented",
  "remediation_note": "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. This documents upstream package version guidance and does not establish downstream distribution patch state.",
  "checked_date": "2026-11-17",
  "impacts": [
    {
      "cves": [
        "CVE-2026-54902"
      ],
      "consequences": [
        "denial of service"
      ],
      "conditions": "Oj SAJ mode must parse an object key of at least 35 bytes and a Ruby callback must trigger GC while the nested object remains open.",
      "exploitation": "The maintainer advisory reproduces a segfault. It does not describe exploitation in the wild or establish a general remote denial-of-service path.",
      "source_url": "https://github.com/ohler55/oj/security/advisories/GHSA-m578-w5vf-rfcm",
      "checked_date": "2026-11-17"
    }
  ],
  "cvss": [
    {
      "cve": "CVE-2026-54902",
      "version": "4.0",
      "score": 6.3,
      "vector": "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",
      "source_url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/54xxx/CVE-2026-54902.json",
      "source_name": "CNA CVE Program record",
      "checked_date": "2026-11-17"
    }
  ]
}
