{"answers":{"affected":"2 open source packages ship an affected version, including oj.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54592 exists.","fix":"Upgrade oj to 3.17.3 or later.","what":"CVE-2026-54592 is a high-severity memory corruption vulnerability in ohler55 oj, published on 30 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-54592 and fix it if it is affected.\n\nWhat it is: CVE-2026-54592 is a high-severity memory corruption vulnerability in ohler55 oj, published on 30 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54592 exists.\n\nAffected packages and fixed versions:\n- oj (RubyGems): affected all versions; fixed in 3.17.3\n- oj (RubyGems): affected all versions; fixed in 3.17.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-54592/ (Markdown: https://insights.sbomify.com/CVE-2026-54592/index.md)","id":"CVE-2026-54592","markdown":"https://insights.sbomify.com/CVE-2026-54592/index.md","name":"CVE-2026-54592","record":{"aliases":["DEBIAN-CVE-2026-54592","GHSA-3m6q-jj5j-38c9","MINI-45mf-hr3r-4jqr","MINI-4jvm-38qx-qg9r","MINI-7vw4-xcwv-w6w3","MINI-cvr9-2qpm-8962","MINI-f263-2pw5-9m3v","MINI-h3fm-p5xg-fc98","MINI-mh65-r63g-hc9v","MINI-mpwj-qhc9-95v9","MINI-p33g-xwrf-pxj7","MINI-x649-frrp-vp25","UBUNTU-CVE-2026-54592"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby JSON parser","requires_auth":"none","summary":"A stack buffer overflow in the Oj Ruby gem allows attackers to cause a denial of service via deeply nested JSON input.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-125","name":"Out-of-bounds Read"}],"description":"Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.3, Oj::Doc#each_child, when invoked recursively over a deeply nested JSON document, overflows a fixed-size stack buffer and aborts the process, leading to DoS.  In a two-step chain in ext/oj/fast.c, doc_each_child increments doc-\u003ewhere past the where_path[MAX_STACK = 100] array with no bounds check and never restores it (the doc-\u003ewhere-- is missing), so calling each_child recursively from inside the yield block drives doc-\u003ewhere beyond the array. On the next entry  the function copies the path into the 800-byte stack-local buffer save_path[MAX_STACK]  using wlen = doc-\u003ewhere - doc-\u003ewhere_path, so when the previous recursive call left doc-\u003ewhere past where_path[100] the wlen exceeds MAX_STACK and  the memcpy overflows save_path on the C stack; because the Oj::Doc parser imposes no JSON nesting-depth limit (relying on a C-stack pressure check), deeply nested attacker input reaches this path. This issue has been fixed in version 3.17.3.","ecosystems":["RubyGems"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Oj: Stack Buffer Overflow in Oj::Doc#each_child via Deeply Nested Input","id":"CVE-2026-54592","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"memory_corruption","year":"2026"},"n_packages":2,"n_references":1,"next":{"headline":"Pterodactyl's improper JWT scoping allows subuser to upload files when not explicitly granted `file.create` permissions","id":"CVE-2026-54593"},"packages":[{"ecosystem":"RubyGems","fixed":["3.17.3"],"introduced":["0"],"last_affected":[],"package":"oj","purl":null,"source":"GHSA-3m6q-jj5j-38c9"},{"ecosystem":"RubyGems","fixed":["3.17.3"],"introduced":["0"],"last_affected":[],"package":"oj","purl":"pkg:gem/oj","source":"GHSA-3m6q-jj5j-38c9"}],"prev":{"headline":"AsyncSSH: SCP Path Traversal to Arbitrary File Write","id":"CVE-2026-54591"},"products":["oj"],"published":"2026-06-30","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-07-01","vendors":["ohler55"]},"summary":"A stack buffer overflow in the Oj Ruby gem allows attackers to cause a denial of service via deeply nested JSON input.","url":"https://insights.sbomify.com/CVE-2026-54592/"}