---
id: "CVE-2024-3955"
kind: "vulnerability"
aliases: ["CVE-2024-3955", "GHSA-4f92-w438-f484"]
title: "CraftBeerPi 4 allows arbitrary code execution"
severity: "critical"
cvss: 9.8
epss: 0.01149
exploited: false
status: "open"
category: "package"
products: [{"name": "cbpi4", "fixed": ["4.4.1.a1"], "affected": ">= 4.0.0.58, < 4.4.1.a1", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-94", "package", "pypi", "python", "raspberry-pi", "self-hosted"]
not_affected_if: ["default-config"]
published_at: "2024-05-02T10:15:08+00:00"
first_seen_at: "2026-10-27T16:25:43+00:00"
updated_at: "2026-10-27T16:33:07+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-4f92-w438-f484", "first_seen_at": "2026-10-27T16:25:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-3955", "first_seen_at": "2026-10-27T16:33:07+00:00"}]
---

# CraftBeerPi 4 allows arbitrary code execution

CraftBeerPi 4 passes the logtime URL parameter of its downloadlog endpoint straight into os.system without validation. An attacker who can send a crafted request can run arbitrary operating system commands on the host.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:cbpi4 affected >= 4.0.0.58, < 4.4.1.a1 fixed 4.4.1.a1

## How to check

- Run `pip show cbpi4` and confirm the installed version is below `4.4.1.a1` and at least `4.0.0.58`
- Check whether the web interface is reachable from untrusted networks, since the endpoint is served by the CraftBeerPi HTTP server

## Fix

- Upgrade the `cbpi4` PyPI package to `4.4.1.a1` or later
- Until upgraded, block external access to the CraftBeerPi web port

## Timeline

- 2026-10-27T16:25:43+00:00 ghsa https://github.com/advisories/GHSA-4f92-w438-f484
- 2026-10-27T16:33:07+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2024-3955

## From the sources

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).

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
