{"answers":{"affected":"2 open source packages ship an affected version, including propel/propel1.","exploited":"There is no known exploitation of GHSA-7g7c-qhf3-x59p in the wild and no public exploit code.","fix":"Upgrade propel/propel1 to 1.7.2 or later.","what":"GHSA-7g7c-qhf3-x59p is a SQL injection vulnerability in propel/propel1, 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-7g7c-qhf3-x59p and fix it if it is affected.\n\nWhat it is: GHSA-7g7c-qhf3-x59p is a SQL injection vulnerability in propel/propel1, 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-7g7c-qhf3-x59p in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- propel/propel1 (Packagist): affected from 1; fixed in 1.7.2\n- propel/propel1 (Packagist): affected from 1; fixed in 1.7.2\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-7g7c-qhf3-x59p/ (Markdown: https://insights.sbomify.com/GHSA-7g7c-qhf3-x59p/index.md)","id":"GHSA-7g7c-qhf3-x59p","markdown":"https://insights.sbomify.com/GHSA-7g7c-qhf3-x59p/index.md","name":"GHSA-7g7c-qhf3-x59p","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 Propel ORM, 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 Criteria::setLimit() or in DBMySQL::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":"propel/propel1 SQL injection possible with limit() on MySQL","id":"GHSA-7g7c-qhf3-x59p","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":["1.7.2"],"introduced":["1"],"last_affected":[],"package":"propel/propel1","purl":null,"source":"GHSA-7g7c-qhf3-x59p"},{"ecosystem":"Packagist","fixed":["1.7.2"],"introduced":["1"],"last_affected":[],"package":"propel/propel1","purl":"pkg:composer/propel/propel1","source":"GHSA-7g7c-qhf3-x59p"}],"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 Propel ORM, leading to data modification or deletion.","url":"https://insights.sbomify.com/GHSA-7g7c-qhf3-x59p/"}