Oj: Use-After-Free in Oj::Parser SAJ Callback via Input Mutation
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| ohler55 | oj | affected |
|
No data.
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Ohler | Oj |
|
| Source | ID | Title |
|---|---|---|
Debian DLA |
DLA-4803-1 | ruby-oj security update |
Debian DSA |
DSA-6521-1 | ruby-oj security update |
Github GHSA |
GHSA-q2gm-54r6-8fwm | Oj: Use-After-Free in Oj::Parser SAJ Callback via Input Mutation |
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.203% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| Weaknesses | CWE-825 | |
| References |
| |
| Metrics |
threat_severity
|
cvssV3_1
|
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Ohler
Ohler oj |
|
| Vendors & Products |
Ohler
Ohler oj |
| Type | Values Removed | Values Added |
|---|---|---|
| Description | Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2,Oj::Parser#parse is vulnerable to a heap use-after-free when a SAJ/SAJ2 callback mutates the input JSON string during parsing. The C engine holds a raw const byte * pointer into the Ruby string's internal buffer. If a callback (e.g. hash_start) resizes the string — for example by calling String#replace with a longer value — Ruby reallocates the string buffer and frees the old one. The C parser's pointer is left dangling; the next character read at parser.c:607 is a use-after-free. This issue has been fixed in version 3.17.2. | |
| Title | Oj: Use-After-Free in Oj::Parser SAJ Callback via Input Mutation | |
| Weaknesses | CWE-416 | |
| References |
| |
| Metrics |
cvssV4_0
|