{"answers":{"affected":"3 open source packages ship an affected version, including pydash. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-26145 exists.","fix":"Upgrade pydash to 6.0.0 or later.","what":"CVE-2023-26145 is a high-severity code injection vulnerability in pydash, published on 28 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-26145 and fix it if it is affected.\n\nWhat it is: CVE-2023-26145 is a high-severity code injection vulnerability in pydash, published on 28 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-26145 exists.\n\nAffected packages and fixed versions:\n- pydash (PyPI): affected all versions; fixed in 6.0.0\n- pydash (PyPI): affected all versions; fixed in 6.0.0\n- pydash (PyPI): affected all versions; fixed in 6.0.0\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/CVE-2023-26145/ (Markdown: https://insights.sbomify.com/CVE-2023-26145/index.md)","id":"CVE-2023-26145","markdown":"https://insights.sbomify.com/CVE-2023-26145/index.md","name":"CVE-2023-26145","record":{"aliases":["GHSA-8mjr-6c96-39w8","PYSEC-2023-179"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python utility library","requires_auth":"none","summary":"Attackers can execute arbitrary code via command injection in pydash invoke methods if they control path strings and arguments.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"snyk","cpe":[{"product":"pydash","vendor":"derrickgilland"}],"cvss":{"score":7.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N/E:P","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"},{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"description":"This affects versions of the package pydash before 6.0.0. A number of pydash methods such as pydash.objects.invoke() and pydash.collections.invoke_map() accept dotted paths (Deep Path Strings) to target a nested Python object, relative to the original source object. These paths can be used to target internal class attributes and dict items, to retrieve, modify or invoke nested Python objects.\r\r**Note:**\r\rThe pydash.objects.invoke() method is vulnerable to Command Injection when the following prerequisites are satisfied:\r\r1) The source object (argument 1) is not a built-in object such as list/dict (otherwise, the __init__.__globals__ path is not accessible)\r\r2) The attacker has control over argument 2 (the path string) and argument 3 (the argument to pass to the invoked method)\r\r\rThe pydash.collections.invoke_map() method is also vulnerable, but is harder to exploit as the attacker does not have direct control over the argument to be passed to the invoked function.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"pydash Command Injection vulnerability","id":"CVE-2023-26145","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2023"},"n_packages":3,"n_references":3,"next":{"headline":"Cross-site scripting in ithewei/libhv","id":"CVE-2023-26146"},"packages":[{"ecosystem":"PyPI","fixed":["6.0.0"],"introduced":["0"],"last_affected":[],"package":"pydash","purl":null,"source":"GHSA-8mjr-6c96-39w8"},{"ecosystem":"PyPI","fixed":["6.0.0"],"introduced":["0"],"last_affected":[],"package":"pydash","purl":"pkg:pypi/pydash","source":"GHSA-8mjr-6c96-39w8"},{"ecosystem":"PyPI","fixed":["6.0.0"],"introduced":["0"],"last_affected":[],"package":"pydash","purl":"pkg:pypi/pydash","source":"PYSEC-2023-179"}],"prev":{"headline":"graphql Uncontrolled Resource Consumption vulnerability","id":"CVE-2023-26144"},"products":["pydash"],"published":"2023-09-28","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-09-23","vendors":["n/a"]},"summary":"Attackers can execute arbitrary code via command injection in pydash invoke methods if they control path strings and arguments.","url":"https://insights.sbomify.com/CVE-2023-26145/"}