CraftBeerPi 4 allows arbitrary code execution
The advisory, in context
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).
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
From 4.0.0.58 before 4.4.1.a1
Fixed in 4.4.1.a1
30 explicitly affected versions
4.0.5, 4.0.5a13, 4.0.5a14, 4.0.5a15, 4.0.5a16, 4.0.6, 4.0.7, 4.0.7rc1, 4.0.7rc3, 4.1.0, 4.1.0a2, 4.1.0a3, 4.1.0rc1, 4.1.0rc2, 4.1.0rc5, 4.1.0rc8, 4.1.10, 4.1.10rc2, 4.1.11, 4.1.2, 4.1.6, 4.1.7, 4.1.7rc1, 4.2.0, 4.2.0a6, 4.2.0rc1, 4.3.0, 4.3.1, 4.3.2, 4.4.0
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "4.0.0.58"
},
{
"fixed": "4.4.1.a1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"4.0.5",
"4.0.5a13",
"4.0.5a14",
"4.0.5a15",
"4.0.5a16",
"4.0.6",
"4.0.7",
"4.0.7rc1",
"4.0.7rc3",
"4.1.0",
"4.1.0a2",
"4.1.0a3",
"4.1.0rc1",
"4.1.0rc2",
"4.1.0rc5",
"4.1.0rc8",
"4.1.10",
"4.1.10rc2",
"4.1.11",
"4.1.2",
"4.1.6",
"4.1.7",
"4.1.7rc1",
"4.2.0",
"4.2.0a6",
"4.2.0rc1",
"4.3.0",
"4.3.1",
"4.3.2",
"4.4.0"
]
}References
- https://nvd.nist.gov/vuln/detail/CVE-2024-3955
- https://github.com/PiBrewing/craftbeerpi4/issues/132
- https://cert.pl/en/posts/2024/05/CVE-2024-3955
- https://cert.pl/posts/2024/05/CVE-2024-3955
- https://github.com/PiBrewing/craftbeerpi4
- https://github.com/pypa/advisory-database/tree/main/vulns/cbpi4/PYSEC-2026-308.yaml
- https://pypi.org/project/cbpi4