CVE-2022-24737: Exposure of Sensitive Information to an Unauthorized Actor in httpie

Published Mar 7, 2022
·
Updated

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:

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‘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:

bash $ http --session api pie.dev/basic-auth/user/pass

json { "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.

bash $ http -F --session jar pie.dev/cookies/set/x/y

json { "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:

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

(Pre 3.1.0) json { "cookies": { "x": "y" } }

(Post 3.1.0) json { "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: Email us: security@httpie.io

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

Other sources

HTTPie is a command-line HTTP client. HTTPie has 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. 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. Users are advised to upgrade. There are no known workarounds.

— NVD

Affected Software

18 affected componentsFixes available
pip/httpie<3.1.0
3.1.0
httpie httpie<3.1.0
Fedoraproject Fedora=34
Fedoraproject Fedora=35
Fedoraproject Fedora=36
debian/httpie
3.2.1-13.2.4-33.2.4-4
debian/httpie<3.2.1-1
3.2.1-1
debian/httpie<3.2.1-1
3.2.1-1
debian/httpie<3.2.1-1
3.2.1-1
ubuntu/httpie*
ubuntu/httpie*
ubuntu/httpie*
ubuntu/httpie*
ubuntu/httpie*
ubuntu/httpie*
ubuntu/httpie*
ubuntu/httpie*
ubuntu/httpie*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/httpie to a version that resolves this vulnerability.

    Fixed in 3.1.0
  2. Upgrade

    Upgrade debian/httpie to a version that resolves this vulnerability.

    Fixed in 3.2.1-1Fixed in 3.2.4-3Fixed in 3.2.4-4
  3. Upgrade

    Upgrade debian/httpie to a version that resolves this vulnerability.

    Fixed in 3.2.1-1
  4. Upgrade

    Upgrade HTTPie to a version that resolves this vulnerability.

    Fixed in 3.1.0
  5. Operational

    Run `httpie cli sessions upgrade` on existing HTTPie sessions.

Event History

Mar 7, 2022
CVE Published
via MITRE·11:10 PM
Data Sourced
via MITRE·11:10 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·11:15 PM
DescriptionSeverityAffected Software
Advisory Published
via GitHub·11:44 PM

Frequently Asked Questions

1

What is CVE-2022-24737?

CVE-2022-24737 is a vulnerability in the HTTPie command-line HTTP client before version 3.1.0.

2

What is the severity of CVE-2022-24737?

The severity of CVE-2022-24737 is medium with a CVSS score of 6.5.

3

How does CVE-2022-24737 affect HTTPie?

CVE-2022-24737 affects HTTPie versions before 3.1.0.

4

How can I fix CVE-2022-24737?

To fix CVE-2022-24737, you should update HTTPie to version 3.1.0 or newer.

5

Where can I find more information about CVE-2022-24737?

You can find more information about CVE-2022-24737 on the GitHub release page and the GitHub security advisories page.

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