{"id":"CVE-2024-35374","kind":"vulnerability","aliases":["CVE-2024-35374","GHSA-j6cv-98jx-mrwr"],"related":[],"title":"Mocodo vulnerable to SQL injection in `/web/generate.php`","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 SQL commands and potentially command injection, leading to remote code execution (RCE) under certain conditions.","summary":"Mocodo's online generator at /web/generate.php does not sanitize the sql_case input, so a remote attacker can inject SQL. The sources say this can lead to command injection and remote code execution under certain conditions.","severity":"critical","cvss":9.8,"epss":0.02767,"exploited":false,"exploited_at":null,"products":[{"name":"mocodo","fixed":["4.2.7"],"affected":"<= 4.2.6","ecosystem":"pypi"},{"name":"mocodo online","fixed":[],"affected":"<= 4.2.6","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["cwe-89","mocodo","package","python","self-hosted"],"not_affected_if":["no-web-endpoint"],"how_to_check":"- Check the installed version with `pip show mocodo` and look for versions at or below `4.2.6`.\n- Check whether the Mocodo web app (web/generate.php) is deployed and reachable from the internet.","fix":"- Upgrade `mocodo` (PyPI) to `4.2.7`.","status":"open","published_at":"2024-05-24T21:15:59+00:00","first_seen_at":"2026-11-16T15:37:42+00:00","triaged_at":"2026-11-16T15:37:51+00:00","updated_at":"2026-11-16T16:08:50+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-11-16T15:37:51Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade `mocodo` (PyPI) to `4.2.7`.","reach":"internet","title":"Mocodo: SQL injection in web generator lets attackers run SQL commands","impact":"high","summary":"Mocodo's online generator at /web/generate.php does not sanitize the sql_case input, so a remote attacker can inject SQL. The sources say this can lead to command injection and remote code execution under certain conditions.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","mocodo","self-hosted"],"confidence":0.7,"fix_status":"available","needs_auth":"unknown","worst_case":"Attacker runs SQL commands and possibly code on the server","analyst_note":"","how_to_check":"- Check the installed version with `pip show mocodo` and look for versions at or below `4.2.6`.\n- Check whether the Mocodo web app (web/generate.php) is deployed and reachable from the internet.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["no-web-endpoint"],"who_is_affected":"Teams that run the Mocodo web application (the /web/generate.php endpoint) and expose it to remote users are exposed. Installs that use Mocodo only as a local library or command-line tool without the web endpoint are less likely to be affected; the sources do not say more.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"unknown","severity_if_unknown":"critical"},"cost_usd":0.000718,"input_tokens":4609,"output_tokens":514,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2024':9A,17A '-35374':10A,18A '-89':23B '/web/generate.php':7A,35B,82C '4.2.6':69C '98jx':14A 'allow':83C 'arbitrari':88C 'attack':46B,85C 'case':41B,78C 'certain':64B,102C 'code':61B,98C 'command':57B,90C,93C 'condit':65B,103C 'cve':8A,16A 'cwe':22B 'execut':62B,87C,99C 'field':80C 'generat':33B 'ghsa':12A 'ghsa-j6cv-98jx-mrwr':11A 'host':29B 'inject':5A,48B,58B,94C 'input':42B,79C 'j6cv':13A 'lead':55B,95C 'mocodo':1A,19A,20A,24B,30B,66C,67C 'mrwr':15A 'onlin':32B,68C 'online':21A 'packag':25B 'potenti':92C 'proper':74C 'python':26B 'rce':100C 'remot':45B,60B,84C,97C 'sanit':38B,75C 'say':52B 'self':28B 'self-host':27B 'sourc':51B 'sql':4A,40B,49B,77C,89C 'vulner':2A","nicknames":[],"mitigations":[],"who_affected":"Teams that run the Mocodo web application (the /web/generate.php endpoint) and expose it to remote users are exposed. Installs that use Mocodo only as a local library or command-line tool without the web endpoint are less likely to be affected; the sources do not say more.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["mocodo","mocodoonline","online"],"ptokens":["mocodo","online"],"labels":["critical","cwe89","mocodo","package","pypi","python","selfhosted","vendor"],"campaign_type":null,"search_a":"'-2024':9A,17A '-35374':10A,18A '/web/generate.php':7A '98jx':14A 'cve':8A,16A 'ghsa':12A 'ghsa-j6cv-98jx-mrwr':11A 'inject':5A 'j6cv':13A 'mocodo':1A,19A,20A 'mrwr':15A 'online':21A 'sql':4A 'vulner':2A","search_b":"'-89':23B '/web/generate.php':35B 'attack':46B 'case':41B 'certain':64B 'code':61B 'command':57B 'condit':65B 'cwe':22B 'execut':62B 'generat':33B 'host':29B 'inject':48B,58B 'input':42B 'lead':55B 'mocodo':24B,30B 'onlin':32B 'packag':25B 'python':26B 'remot':45B,60B 'sanit':38B 'say':52B 'self':28B 'self-host':27B 'sourc':51B 'sql':40B,49B","search_c":"'/web/generate.php':82C '4.2.6':69C 'allow':83C 'arbitrari':88C 'attack':85C 'case':78C 'certain':102C 'code':98C 'command':90C,93C 'condit':103C 'execut':87C,99C 'field':80C 'inject':94C 'input':79C 'lead':95C 'mocodo':66C,67C 'onlin':68C 'potenti':92C 'proper':74C 'rce':100C 'remot':84C,97C 'sanit':75C 'sql':77C,89C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2024-05-24T21:15:59+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":1,"sources":[{"source":"ghsa","external_id":"GHSA-j6cv-98jx-mrwr","url":"https://github.com/advisories/GHSA-j6cv-98jx-mrwr","severity":"critical","published_at":"2024-05-28T20:20:37+00:00","modified_at":"2026-11-16T15:33:23+00:00","first_seen_at":"2026-11-16T15:37:42+00:00","fetched_at":"2026-11-16T15:46:58+00:00","note":null},{"source":"nvd","external_id":"CVE-2024-35374","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35374","severity":null,"published_at":"2024-05-24T21:15:59+00:00","modified_at":"2026-06-17T07:34:50+00:00","first_seen_at":"2026-11-16T16:08:50+00:00","fetched_at":"2026-11-16T16:08:50+00:00","note":null}],"documents":[{"id":170500,"url":"https://github.com/laowantong/mocodo/commit/f9368df28518b6c4a92fd207c260f1978ec34d6e","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":171139,"url":"https://chocapikk.com/posts/2024/mocodo-vulnerabilities/","title":"Exploit: chocapikk.com","kind":"poc","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"poc","confidence":null,"note":"Exploit: chocapikk.com"}],"disclosures":[],"exploit_sources":[{"type":"poc","url":"https://chocapikk.com/posts/2024/mocodo-vulnerabilities/"},{"type":"epss","score":0.02767,"url":"https://api.first.org/data/v1/epss?cve=CVE-2024-35374"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}