CVE-2022-24737: Httpie Exposure Of Sensitive Information To Vulnerability
MODERATECVE-2022-24737 is a MODERATE (CVSS 6.5) exposure of sensitive information to vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Httpie libraries in the PyPI ecosystem. The issue involves exposure of sensitive information to an unauthorized actor in httpie. Remediation is available by upgrading affected packages to version 3.1.0.
CVE-2022-24737 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N).
How to Fix CVE-2022-24737
To remediate this vulnerability, upgrade all affected Httpie dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install httpie>=3.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show httpie
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-24737, inspect your installed packages using pip:
pip show httpie
Analyze the terminal output to locate any version of Httpie in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.0), your application is affected.
Note: The pip show httpie command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Httpie, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-24737 Affected Httpie Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
httpie
|
PyPI |
< 3.1.0
|
3.1.0
|
References
Frequently Asked Questions
What is CVE-2022-24737?
Which Httpie versions are affected?
What version fixes CVE-2022-24737?
Is httpie affected?
What is the CVSS score of CVE-2022-24737?
What CWE is associated with CVE-2022-24737?
How can I check PyPI dependencies for CVE-2022-24737?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9w4w-cpc8-h2fq",
"modified" : "2024-09-23T17:02:49Z",
"published" : "2022-03-07T23:44:28Z",
"aliases" : [ "CVE-2022-24737" ],
"summary" : "Exposure of Sensitive Information to an Unauthorized Actor in httpie",
"details" : "### Impact\nHTTPie 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`:\n\n```bash\n$ http --session api -a user:pass pie.dev/basic-auth/user/pass\n```\n\n```json\n{\n \"authenticated\": true,\n \"user\": \"user\"\n}\n```\n\nSince 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:\n\n```bash\n$ http --session api pie.dev/basic-auth/user/pass\n```\n\n```json\n{\n \"authenticated\": true,\n \"user\": \"user\"\n}\n```\n\nOne particular use case of these sessions is storing cookies (commonly referred to as a `Cookie Jar`). If a response has a `Set-Cookie`\nheader, 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).\n\nThis is extremely useful, especially when you are dealing with websites which manage their own state on the client-side through cookies.\n\n```bash\n$ http -F --session jar pie.dev/cookies/set/x/y\n```\n\n```json\n{\n \"cookies\": {\n \"x\": \"y\"\n }\n}\n```\n\nBefore `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:\n\n```bash\n$ http -F --session jar pie.dev/redirect-to url==https://httpbin.org/cookies\n```\n\n(Pre 3.1.0)\n```json\n{\n \"cookies\": {\n \"x\": \"y\"\n }\n}\n```\n\n(Post 3.1.0)\n```json\n{\n \"cookies\": {}\n}\n```\n\nThis behavior has been corrected in this release (with taking [RFC 6265 — HTTP State Management Mechanism](https://datatracker.ietf.org/doc/html/rfc6265) into the consideration).\n\nA huge credit goes to [@Glyph](https://github.com/glyph) for disclosing the original vulnerability to us (through [huntr.dev](http://huntr.dev/)).\n\n### Patches\nWe suggest users to upgrade their HTTPie version to `3.1.0` or higher, and run `httpie cli sessions upgrade` command on their sessions.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us: [`security@httpie.io`](mailto:security@httpie.io)\n\n> Please note that this entry is covered by both [CVE-2022-24737](https://www.cvedetails.com/cve/CVE-2022-24737) and [CVE-2022-0430](https://nvd.nist.gov/vuln/detail/CVE-2022-0430).\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "httpie"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/httpie/httpie/security/advisories/GHSA-9w4w-cpc8-h2fq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24737"
}, {
"type" : "WEB",
"url" : "https://github.com/httpie/httpie/commit/65ab7d5caaaf2f95e61f9dd65441801c2ddee38b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/httpie/httpie"
}, {
"type" : "WEB",
"url" : "https://github.com/httpie/httpie/releases/tag/3.1.0"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/httpie/PYSEC-2022-34.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4QZD2AZOL7XLNZVAV6GDNXYU6MFRU5RS"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/R5VYSYKEKVZEVEBIWAADGDXG4Y3EWCQ3"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TXFCHGTW3V32GD6GXXJZE5QAOSDT3RTY"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-07T23:44:28Z",
"nvd_published_at" : "2022-03-07T23:15:00Z"
}
}