GHSA-2vjq-hg5w-5gm7 CVE-2024-32977 PYSEC-2024-237
OctoPrint has an Authentication Bypass via X-Forwarded-For Header when autologinLocal is enabled
- Severity
- 7.1 / 10
- Critical · CVSS 3.1
- Exploit chance (EPSS)
- 0.90%
- Chance of exploitation in the next 30 days. Higher than 59.60% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-290 Authentication Bypass by Spoofing
- Fix
1.10.1- Upgrade octoprint to this version or later
Description
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
- Enable the
autologinAsconfiguration within theaccessControlsection in the OctoPrint yaml configuration file - Set your browser to add the
X-Forwarded-For: 127.0.0.1header 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. - Navigate to OctoPrint and note that it logs you in automatically.
Credits
This vulnerability was discovered and responsibly disclosed to OctoPrint by Jacopo Tediosi.
Affected versions
PyPI
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
octoprint PyPI → 1.10.1
- pip
pip install --upgrade "octoprint>=1.10.1"- poetry
poetry add "octoprint>=1.10.1"- uv
uv add "octoprint>=1.10.1"
Severity breakdown
CVSS 3.1 7.1
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L
- Attack vector
- Adjacent
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- Low
Weakness
CWE-290: Authentication Bypass by Spoofing
This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-j4h9-pm27-4rfw OctoPrint has possible file exfiltration via query parameters on upload endpoints | High | Also affects octoprint |
| GHSA-p6qx-ghxm-389h OctoPrint has XSS in its Suppressed Command Notifications | Medium | Also affects octoprint |
| GHSA-xg4x-w2j3-57h6 OctoPrint has Timing Side-Channel Vulnerability in API Key Authentication | Medium | Also affects octoprint |
| GHSA-crvm-xjhm-9h29 OctoPrint vulnerable to XSS in Action Commands Notification and Prompt | Medium | Also affects octoprint |
| GHSA-49mj-x8jp-qvfc OctoPrint is Vulnerable to RCE Attacks via Unsanitized Filename in File Upload | High | Also affects octoprint |
| GHSA-9wj4-8h85-pgrw OctoPrint Vulnerable to Denial of Service through malformed HTTP request in OctoPrint | Medium | Also affects octoprint |
| GHSA-m9jh-jf9h-x3h2 OctoPrint vulnerable to possible file extraction via upload endpoints | Medium | Also affects octoprint |
| GHSA-qw93-h6pf-226x OctoPrint Authenticated Reverse Proxy Page Authentication Bypass | Medium | Also affects octoprint |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor