CVE-2024-35374: Mocodo SQL Injection Vulnerability in generate.php

mocodo Updated 29 Jun 2026

Summary

29/06/2026
Yes i
Critical
9.8

CVE-2024-35374: Mocodo vulnerable to SQL injection in /web/generate.php. Affects mocodo versions < 4.2.7. Fixed in 4.2.7. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Mocodo is an online tool designed for creating entity-relationship diagrams from textual descriptions. It is widely used for database modeling and offers a user-friendly interface for generating visual representations of data structures. However, versions 4.2.6 and below are vulnerable to SQL injection attacks, which can compromise the integrity and security of the application.

Vulnerability Detail

The vulnerability arises from improper sanitization of the 'sql_case' input field in the '/web/generate.php' file of Mocodo. This flaw allows remote attackers to inject arbitrary SQL commands, potentially leading to command injection and remote code execution (RCE) under certain conditions. The implications of this vulnerability are severe, as it could allow attackers to manipulate the database, access sensitive information, or execute malicious code on the server.

How To Fix

Latest published version: 4.3.3 as of 23 Oct 2026

pip install --upgrade "mocodo==4.3.3"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.2.7

This is the first release that contains the fix.

pip install --upgrade "mocodo==4.2.7"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users should avoid using the 'sql_case' input field in the '/web/generate.php' until the package is updated. Additionally, implementing web application firewalls (WAF) or input validation mechanisms can help mitigate the risk of SQL injection attacks.

Conclusion

The SQL injection vulnerability in Mocodo versions 4.2.6 and below poses a significant risk to users. It is crucial to update to version 4.2.7 or later to mitigate this risk. Users are also encouraged to utilize tools like Vulert for real-time monitoring of open-source vulnerabilities.

See every vulnerability recorded for mocodo →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 9.8, indicating a critical level of severity.

You can use the Vulert playground at Vulert Scanner to check if your application is affected without needing to sign up.

If exploited, this vulnerability can lead to unauthorized access to the database, data manipulation, and remote code execution.

Yes, the vulnerability has been patched in version 4.2.7 of Mocodo. Users should upgrade to this version.

If an immediate update is not possible, avoid using the vulnerable input fields and consider implementing additional security measures such as input validation.

How To Fix

Latest published version: 4.3.3 as of 23 Oct 2026

pip install --upgrade "mocodo==4.3.3"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.2.7

This is the first release that contains the fix.

pip install --upgrade "mocodo==4.2.7"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback