CVE-2026-129784: Insecure deserializaiton in the httpx Ruby gem via unsafe Oj object-mode

Published Nov 16, 2026
·
Updated

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 multijson is absent, the decoder falls back to jsonload, which calls Oj.load(response.tos) 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.

Affected Software

1 affected component
rubygems/httpx=1.9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade httpx to a version that resolves this vulnerability.

    Fixed in 1.9.1
  2. Configuration

    If upgrading is not possible, pass mode: :strict to response.json, or set Oj.default_options = { mode: :strict } (or :rails) before parsing untrusted JSON.

    HTTPX/Oj JSON decoding mode = :strict (or :rails for the process-wide default)

Event History

Nov 16, 2026
CVE Published
via MITRE·10:53 AM
Data Sourced
via MITRE·10:53 AM
RemedyDescriptionSeverityWeakness

Frequently Asked Questions

1

Under what runtime conditions is the vulnerable decoder used?

The vulnerable path is used when the oj gem is loaded and multi_json is absent. In that case, HTTPX::Response#json reaches Oj.load without specifying a safe mode.

2

What does an attacker need to control to exploit this issue?

An attacker must control, or be able to influence, a URL that the application fetches with HTTPX.get(url).json. They also need to provide a crafted JSON response that reaches the affected decoding path.

3

Are all applications using HTTPX 1.9.0 equally exposed?

No. Exposure depends on whether the application parses responses with HTTPX::Response#json, has oj loaded, lacks multi_json, and fetches attacker-controlled or attacker-influenced URLs. Exploitation for code execution additionally depends on a suitable gadget chain already being available in the process.

4

How can I mitigate the issue if I cannot immediately upgrade?

Avoid calling .json on responses fetched from attacker-controlled or attacker-influenced URLs while oj is loaded and multi_json is absent. Removing oj from the affected runtime or ensuring multi_json is present prevents the described fallback to Oj.load object mode.

5

Which version resolves the vulnerability?

The issue affects httpx 1.9.0 and is fixed in version 1.9.1.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203