CVE-2024-32977
JSON

7.1high

OctoPrint Authentication Bypass via X-Forwarded-For Header when autologinLocal is enabled

Severity
7.1high CVSS:3.1 by GitHub_M
Exploit likelihood
0.90% (higher than 60% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-2vjq-hg5w-5gm7PYSEC-2024-237

Description

OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.10.0 contain a vulnerability that allows an unauthenticated attacker to completely bypass the authentication if the `autologinLocal` option is enabled within `config.yaml`, even if they come from networks that are not configured as `localNetworks`, spoofing their IP via the `X-Forwarded-For` header. If autologin is not enabled, this vulnerability does not have any impact. The vulnerability has been patched in version 1.10.1. Until the patch has been applied, OctoPrint administrators who have autologin enabled on their instances should disable it and/or to make the instance inaccessible from potentially hostile networks like the internet.

Affected

Product or packageVersionsReported by
OctoPrint OctoPrint< 1.10.1, up to 1.10.0, before 1.10.1CVE List, NVD
octoprint (PyPI)before 1.10.1, before 5afbec8d23508edc25b0f1bdef1620580136add4GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M7.1high CVSS:3.1CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L
GitHub7.1high CVSS:3.1CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L
NVD9.4critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
PyPA Advisory Database9.4critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L

Classification

CWE-290

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.10.0 contain a vulnerability that allows an unauthenticated attacker to completely bypass the authentication if the `autologinLocal` option is enabled within `config.yaml`, even if they come from networks that are not configured as `localNetworks`, spoofing their IP via the `X-Forwarded-For` header. If autologin is not enabled, this vulnerability does not have any impact. The vulnerability has been patched in version 1.10.1. Until the patch has been applied, OctoPrint administrators who have autologin enabled on their instances should disable it and/or to make the instance inaccessible from potentially hostile networks like the internet.

GitHub Advisory Database
Impact

OctoPrint versions up until and including 1.10.0 contain a vulnerability that allows an unauthenticated attacker to completely bypass the authentication if the autologinLocal option is enabled within config.yaml, even if they come from networks that are not configured as localNetworks, by spoofing their IP via the X-Forwarded-For header.

If autologin is not enabled, this vulnerability does not have any impact.

Patches

The vulnerability has been patched in version 1.10.1.

Workaround

Until the patch has been applied, OctoPrint administrators who have autologin enabled on their instances should disable it and/or to make the instance inaccessible from potentially hostile networks like the internet.

PoC
  1. Enable the autologinAs configuration within the accessControl section in the OctoPrint yaml configuration file
  2. Set your browser to add the X-Forwarded-For: 127.0.0.1 header to HTTP requests. For example, this can be done using proxy software like Burp Suite. Alternatively, there are browser extensions such as https://github.com/MisterPhilip/x-forwarded-for, but I haven't tried them.
  3. Navigate to OctoPrint and note that it logs you in automatically.
Credits

This vulnerability was discovered and responsibly disclosed to OctoPrint by Jacopo Tediosi.

NVD (es)

OctoPrint proporciona una interfaz web para controlar impresoras 3D de consumo. Las versiones de OctoPrint hasta la 1.10.0 incluida contienen una vulnerabilidad que permite a un atacante no autenticado omitir completamente la autenticación si la opción `autologinLocal` está habilitada dentro de `config.yaml`, incluso si provienen de redes que no están configuradas como `localNetworks `, falsificando su IP a través del encabezado `X-Forwarded-For`. Si el inicio de sesión automático no está habilitado, esta vulnerabilidad no tiene ningún impacto. La vulnerabilidad ha sido parcheada en la versión 1.10.1. Hasta que se haya aplicado el parche, los administradores de OctoPrint que tengan habilitado el inicio de sesión automático en sus instancias deben deshabilitarlo y/o hacer que la instancia sea inaccesible desde redes potencialmente hostiles como Internet.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-32977 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-2vjq-hg5w-5gm7 changed 2026-06-10CC-BY-4.0
NVDCVE-2024-32977 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2024-237 changed 2026-06-10CC-BY-4.0