Vulnerabilities in pkg:pypi/cbpi4
PACKAGECVE-2024-3955 is a CRITICAL (CVSS 9.8) craftbeerpi 4 allows arbitrary code vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Cbpi4 libraries in the PyPI ecosystem. The issue involves craftbeerpi 4 allows arbitrary code execution. Remediation is available by upgrading affected packages to version 4.4.1.a1.
pkg:pypi/cbpi4
Vulnerability advisories affecting package pkg:pypi/cbpi4. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-4f92-w438-f484 | CVE-2024-3955 | CRITICAL | CraftBeerPi 4 allows arbitrary code execution |
CVE-2024-3955 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2024-3955
To remediate this vulnerability, upgrade all affected Cbpi4 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 cbpi4>=4.4.1.a1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show cbpi4
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-3955, inspect your installed packages using pip:
pip show cbpi4
Analyze the terminal output to locate any version of Cbpi4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.1.a1), your application is affected.
Note: The pip show cbpi4 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Cbpi4, 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-2024-3955 Affected Cbpi4 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cbpi4
|
PyPI |
≥ 4.0.0.58
< 4.4.1.a1
|
4.4.1.a1
|
References
Frequently Asked Questions
What is CVE-2024-3955?
Which Cbpi4 versions are affected?
What version fixes CVE-2024-3955?
Is cbpi4 affected?
What is the CVSS score of CVE-2024-3955?
What CWE is associated with CVE-2024-3955?
How can I check PyPI dependencies for CVE-2024-3955?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4f92-w438-f484",
"modified" : "2024-07-05T20:04:18Z",
"published" : "2024-05-02T12:30:40Z",
"aliases" : [ "CVE-2024-3955" ],
"summary" : "CraftBeerPi 4 allows arbitrary code execution",
"details" : "URL GET parameter \"logtime\" utilized within the \"downloadlog\" function from \"cbpi/http_endpoints/http_system.py\" is subsequently passed to the \"os.system\" function in \"cbpi/controller/system_controller.py\" without prior validation allowing arbitrary code execution. This issue affects CraftBeerPi 4: from 4.0.0.58 (commit 563fae9) before 4.4.1.a1 (commit 57572c7).\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "cbpi4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0.58"
}, {
"fixed" : "4.4.1.a1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-3955"
}, {
"type" : "WEB",
"url" : "https://github.com/PiBrewing/craftbeerpi4/issues/132"
}, {
"type" : "WEB",
"url" : "https://cert.pl/en/posts/2024/05/CVE-2024-3955"
}, {
"type" : "WEB",
"url" : "https://cert.pl/posts/2024/05/CVE-2024-3955"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/PiBrewing/craftbeerpi4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-05T20:04:18Z",
"nvd_published_at" : "2024-05-02T10:15:08Z"
}
}