CVE-2024-35374 Mocodo vulnerable to SQL injection in `/web/generate.php`

Critical 9.8 Published Updated

Remote attackers can execute arbitrary commands via unsanitized input in Mocodo Online, leading to remote code execution.

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

What is CVE-2024-35374?

CVE-2024-35374 is a critical command injection vulnerability in n/a, published on 24 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Mocodo Mocodo Online 4.2.6 and below does not properly sanitize the sql_case input field in /web/generate.php, allowing remote attackers to execute arbitrary commands and potentially command injection, leading to remote code execution (RCE) under certain conditions.

Weakness: CWE-77

Which versions are affected by CVE-2024-35374?

3 open source packages ship an affected version, including mocodo. It affects 1 product.

PackageAffectedFixed in
mocodo PyPIAll versions4.2.7
mocodo PyPIAll versions4.2.7
mocodo PyPIAll versions4.2.7

Products include Mocodo Mocodo Online.

How do I fix CVE-2024-35374?

Upgrade mocodo to 4.2.7 or later.

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

Is CVE-2024-35374 being exploited?

There is no known exploitation of CVE-2024-35374 in the wild and no public exploit code.

Sources

Also known as GHSA-j6cv-98jx-mrwr, PYSEC-2026-426.

Is CVE-2024-35374 in your software?

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

Check your SBOMs for free