CVE-2022-1432: OctoPrint Cross-Site Scripting Vulnerability
HIGHCVE-2022-1432 is a HIGH (CVSS 7.5) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting OctoPrint libraries in the PyPI ecosystem. The issue involves cross-site scripting in octoprint. Remediation is available by upgrading affected packages to version 1.8.0.
CVE-2022-1432 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-1432
To remediate this vulnerability, upgrade all affected OctoPrint 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 OctoPrint>=1.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show OctoPrint
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-1432, inspect your installed packages using pip:
pip show OctoPrint
Analyze the terminal output to locate any version of OctoPrint in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.0), your application is affected.
Note: The pip show OctoPrint command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In OctoPrint, 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-1432 Affected OctoPrint Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
OctoPrint
|
PyPI |
< 1.8.0
|
1.8.0
|
References
Frequently Asked Questions
What is CVE-2022-1432?
Which OctoPrint versions are affected?
What version fixes CVE-2022-1432?
Is OctoPrint affected?
What is the CVSS score of CVE-2022-1432?
What CWE is associated with CVE-2022-1432?
How can I check PyPI dependencies for CVE-2022-1432?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h8pc-j334-jjhm",
"modified" : "2024-10-07T21:23:57Z",
"published" : "2022-05-19T00:00:30Z",
"aliases" : [ "CVE-2022-1432" ],
"summary" : "Cross-site Scripting in OctoPrint",
"details" : "Cross-site Scripting (XSS) - Generic in GitHub repository octoprint/octoprint prior to 1.8.0. The Stream URL of octoprint application allowing a xss payload to execute.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "OctoPrint"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-1432"
}, {
"type" : "WEB",
"url" : "https://github.com/octoprint/octoprint/commit/6d259d7e6f5b0de9a1c762831537a386e53978d3"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-h8pc-j334-jjhm"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/octoprint/octoprint"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/octoprint/PYSEC-2022-201.yaml"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/cb545c63-a3c1-4d57-8f06-e4593ab389bf"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-05-25T19:44:25Z",
"nvd_published_at" : "2022-05-18T14:15:00Z"
}
}