CVE-2024–44809: Remote Code Execution in Raspberry Pi Camera Pr
The tilt.php script in the Pi Camera project fails to sanitise the 'position' GET parameter, allowing an attacker to inject shell commands. An attacker could execute arbitrary commands on the Raspberry Pi under the web server user's privileges.
Published on jacobmasse.medium.com
The Pi Camera project, a staple in Raspberry Pi workshops, serves as an introductory tool for those new to technology and programming to help them manage a GPIO camera on their Raspberry PI over a web application. It allows users to control camera modules via a simple web interface, making it a practical tool for…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The 'position' GET parameter is passed to a shell command without sanitisation, allowing command injection.
Impact
An attacker could execute arbitrary commands on the server under the web server user's privileges.
What the attacker needed
Network access to the Pi Camera web interface
The fix
The vulnerability should be fixed by rigorously validating all GET parameters so only expected inputs are processed.
How it was found
- Send a request to the vulnerable URL with a crafted 'position' parameter containing a shell command.
- The command executes and returns output such as the web server username.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A web page that controls a camera takes a value from the address bar and passes it to the computer's command line without checking it. Because the value is not cleaned, someone can add extra commands that the computer will run. This lets an attacker run any command on the device, not just move the camera.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.