{"answers":{"affected":"2 open source packages ship an affected version, including propel/propel.","exploited":"There is no known exploitation of GHSA-7vw7-qx38-37vr in the wild and no public exploit code.","fix":"Upgrade propel/propel to 2.0.0-alpha8 or later.","what":"GHSA-7vw7-qx38-37vr is a SQL injection vulnerability in propel/propel, published on 20 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-7vw7-qx38-37vr and fix it if it is affected.\n\nWhat it is: GHSA-7vw7-qx38-37vr is a SQL injection vulnerability in propel/propel, published on 20 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-7vw7-qx38-37vr in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- propel/propel (Packagist): affected from 2.0.0-alpha1; fixed in 2.0.0-alpha8\n- propel/propel (Packagist): affected from 2.0.0-alpha1; fixed in 2.0.0-alpha8\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-7vw7-qx38-37vr/ (Markdown: https://insights.sbomify.com/GHSA-7vw7-qx38-37vr/index.md)","id":"GHSA-7vw7-qx38-37vr","markdown":"https://insights.sbomify.com/GHSA-7vw7-qx38-37vr/index.md","name":"GHSA-7vw7-qx38-37vr","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_modify","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP ORM library","requires_auth":"none","summary":"Attackers can execute arbitrary SQL commands via the limit() method in Propel2, leading to data modification or deletion.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"The limit() query method is susceptible to catastrophic SQL injection with MySQL.\n\nFor example, given a model User for a table users:\n```\nUserQuery::create()-\u003elimit('1;DROP TABLE users')-\u003efind();\n```\nThis will drop the users table!\n\nThe cause appears to be a lack of integer casting of the limit input in either Propel\\Runtime\\ActiveQuery\\Criteria::setLimit() or in Propel\\Runtime\\Adapter\\Pdo\\MysqlAdapter::applyLimit(). The code comments there seem to imply that casting was avoided due to overflow issues with 32-bit integers.\n\nThis is surprising behavior since one of the primary purposes of an ORM is to prevent basic SQL injection.\n\nThis affects all versions of Propel: 1.x, 2.x, and 3.","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Propel2 SQL injection possible with limit() on MySQL","id":"GHSA-7vw7-qx38-37vr","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"sql_injection","year":"2024"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":["2.0.0-alpha8"],"introduced":["2.0.0-alpha1"],"last_affected":[],"package":"propel/propel","purl":null,"source":"GHSA-7vw7-qx38-37vr"},{"ecosystem":"Packagist","fixed":["2.0.0-alpha8"],"introduced":["2.0.0-alpha1"],"last_affected":[],"package":"propel/propel","purl":"pkg:composer/propel/propel","source":"GHSA-7vw7-qx38-37vr"}],"products":null,"published":"2024-05-20","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can execute arbitrary SQL commands via the limit() method in Propel2, leading to data modification or deletion.","url":"https://insights.sbomify.com/GHSA-7vw7-qx38-37vr/"}