Summary
Exposure of Sensitive Information to an Unauthorized Actor in httpie
For more information
If you have any questions or comments about this advisory:
- Email us:
[email protected]
Please note that this entry is covered by both CVE-2022-24737 and CVE-2022-0430.
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).
CVE-2022-24737 has a CVSS score of 6.5 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.1.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
We suggest users to upgrade their HTTPie version to 3.1.0 or higher, and run httpie cli sessions upgrade command on their sessions.
Frequently Asked Questions
- What is CVE-2022-24737? CVE-2022-24737 is a medium-severity security vulnerability in httpie (pip), affecting versions < 3.1.0. It is fixed in 3.1.0.
- How severe is CVE-2022-24737? CVE-2022-24737 has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of httpie are affected by CVE-2022-24737? httpie (pip) versions < 3.1.0 is affected.
- Is there a fix for CVE-2022-24737? Yes. CVE-2022-24737 is fixed in 3.1.0. Upgrade to this version or later.
- Is CVE-2022-24737 exploitable, and should I be worried? Whether CVE-2022-24737 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2022-24737 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2022-24737? Upgrade
httpieto 3.1.0 or later.