Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍 PyPI

GHSA-9w4w-cpc8-h2fq

MEDIUM

Exposure of Sensitive Information to an Unauthorized Actor in httpie

Also known asCVE-2022-24737PYSEC-2022-34
Published
Mar 7, 2022
Updated
Sep 23, 2024
Affected
1 pkg
Patched
1 / 1
Exploits
1 known

EPSS Exploitation Probability

via FIRST.org ↗
1.6%probability of exploitation in next 30 days
Lower Risk73th percentile+1.03%
0.10%0.78%1.45%2.13%0.6%1.6%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

1 pkg affected
🐍httpie

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Impact

HTTPie have the practical concept of sessions, which help users to persistently store some of the state that belongs to the outgoing requests and incoming responses on the disk for further usage. As an example, we can make an authenticated request and save it to a named session called api:

$ http --session api -a user:pass pie.dev/basic-auth/user/pass
{
    "authenticated": true,
    "user": "user"
}

Since we have now saved the authentication data to that session, we won‘t have to enter it again and again on every invocation. We can simply reference the session, and HTTPie will use the saved state directly from it:

$ http --session api pie.dev/basic-auth/user/pass
{
    "authenticated": true,
    "user": "user"
}

One particular use case of these sessions is storing cookies (commonly referred to as a Cookie Jar). If a response has a Set-Cookie header, HTTPie will parse it and store the actual cookie in the session. And from that point on, all outgoing requests will attach that cookie (in the form of a Cookie header).

This is extremely useful, especially when you are dealing with websites which manage their own state on the client-side through cookies.

$ http -F --session jar pie.dev/cookies/set/x/y
{
    "cookies": {
        "x": "y"
    }
}

Before 3.1.0, HTTPie didn‘t distinguish between cookies and hosts they belonged. This behavior resulted in the exposure of some cookies when there are redirects originating from the actual host to a third party website, e.g:

$ http -F --session jar pie.dev/redirect-to url==https://httpbin.org/cookies

(Pre 3.1.0)

{
    "cookies": {
        "x": "y"
    }
}

(Post 3.1.0)

{
    "cookies": {}
}

This behavior has been corrected in this release (with taking RFC 6265 — HTTP State Management Mechanism into the consideration).

A huge credit goes to @Glyph for disclosing the original vulnerability to us (through huntr.dev).

Patches

We suggest users to upgrade their HTTPie version to 3.1.0 or higher, and run httpie cli sessions upgrade command on their sessions.

For more information

If you have any questions or comments about this advisory:

Please note that this entry is covered by both CVE-2022-24737 and CVE-2022-0430.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIhttpieall versions3.1.0
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for httpie. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update httpie to 3.1.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-9w4w-cpc8-h2fq is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-9w4w-cpc8-h2fq is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-9w4w-cpc8-h2fq. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact HTTPie have the practical concept of [sessions](https://httpie.io/docs/cli/sessions), which help users to persistently store some of the state that belongs to the outgoing requests and incoming responses on the disk for further usage. As an example, we can make an authenticated request and save it to a [named session](https://httpie.io/docs/cli/named-sessions) called `api`: ```bash $ http --session api -a user:pass pie.dev/basic-auth/user/pass ``` ```json { "authenticated": true, "user": "user" } ``` Since we have now saved the authentication data to that session, we won‘
O3 Security · Impact-Aware SCA

Is GHSA-9w4w-cpc8-h2fq in your dependencies?

O3 detects GHSA-9w4w-cpc8-h2fq across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-9w4w-cpc8-h2fq: httpie (Medium 6.5) | O3 Security