Media

Exposure of Sensitive Information to an Unauthorized Actor in httpie

  • Publicada: 07.03.2022
  • Actualizado: 11.10.2026 11:20

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
js
{
    "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
js
{
    "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
js
{
    "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)

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

(Post 3.1.0)

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

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Python (PyPI) httpie < 3.1.0 3.1.0

Referencias

Puntuación CVSS 6.5/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Debilidad (CWE)
CWE-200
Plataforma
Python (PyPI)
Paquete
httpie
Publicada
07.03.2022
Actualizado
11.10.2026 11:20

Fuentes y licencias

OSV / GitHub Advisory Database - PYSEC-2022-34 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-9w4w-cpc8-h2fq - CC BY 4.0

Historial de vulnerabilidades: httpie

Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Entradas en total
4
Primera → última
08.2019 11.2023
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Alta 2
  • Media 2

Divulgaciones por año

  1. 2019: 1
  2. 2020: 0
  3. 2021: 0
  4. 2022: 2
  5. 2023: 1
  6. 2024: 0
  7. 2025: 0
  8. 2026: 0
  1. Media · 2.4 CVE-2022-0430 < 3.1.0 3.1.0
  2. Exposure of Sensitive Information to an Unauthorized Actor in httpie esta entrada
    Media · 6.5 CVE-2022-24737 < 3.1.0 3.1.0
  3. Alta · 8.8 CVE-2019-10751 < 1.0.3 1.0.3

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.