Insecure deserializaiton in the httpx Ruby gem via unsafe Oj object-mode
- State
- Published
- Severity
- 8.5 High
- Published
- Nov 16, 2026
- Updated
- Nov 16, 2026
- Reserved
- Nov 16, 2026
Description
The httpx Ruby gem parses JSON response bodies through its transcoder layer. HTTPX::Response#json delegates to Transcoder::JSON.decode, and when the oj gem is loaded and multi_json is absent, the decoder falls back to json_load, which calls Oj.load(response.to_s) with no mode option. Oj.load defaults to :object mode, in which a response document can allocate any already-loaded Ruby class ("^o":"ClassName") and set its instance variables, or resolve a class or module reference ("^c":"Name"). An attacker who controls, or can influence, the URL an application fetches with HTTPX.get(url).json therefore controls object instantiation in the victim process. With a matching gadget chain, this issue can potentially cause remote code execution. Affects httpx 1.9.0; fixed in 1.9.1.
| Product | Versions |
|---|---|
| httpx os85 | 1.9.0 to before 1.9.1 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 3.1 | 8.5 High | JFROG |
Weaknesses
- CWE-502 Deserialization of Untrusted Data
References
- httpx repositoryProduct Page
- httpx on RubyGemsProduct Page
- Fix commit: json: fix oj integration to avoid RCE modePatch
- httpx v1.9.1 (fixed version)Patch
- Oj security documentation: :object mode and safe loadingTechnical Details
- https://gitlab.com/os85/httpxProduct Page
- https://gitlab.com/os85/httpx/-/commit/eeb785d3250eee9379494fb62c37c315a31e327cPatch
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.