GHSA-9wjh-jr2j-6r4x Remote Code Execution in pi_video_recording

Not scored Published

Attackers can execute arbitrary commands via the /api/record/start endpoint due to insufficient input validation in the pi_video_recording library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is GHSA-9wjh-jr2j-6r4x?

GHSA-9wjh-jr2j-6r4x is a command injection vulnerability in pi_video_recording, published on 2 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

All versions of pi_video_recording are vulnerable to Remote Code Execution. Due to insufficient input validation the server executes arbitrary code through the /api/record/start endpoint. After running the server, curl -POST -H "Content-Type: application/json" -d '{"filename": " || touch /tmp/worked;"}' http://localhost:5000/api/record/startcreates a file in the /tmp/ directory

Recommendation

No fix is currently available. Consider using an alternative module until a fix is made available.

Which versions are affected by GHSA-9wjh-jr2j-6r4x?

2 open source packages ship an affected version, including pi_video_recording.

PackageAffectedFixed in
pi_video_recording npmAll versionsNone
pi_video_recording npmAll versionsNone

How do I fix GHSA-9wjh-jr2j-6r4x?

No fix has been published for GHSA-9wjh-jr2j-6r4x yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is GHSA-9wjh-jr2j-6r4x being exploited?

There is no known exploitation of GHSA-9wjh-jr2j-6r4x in the wild and no public exploit code.

Sources

Is GHSA-9wjh-jr2j-6r4x in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free