{"answers":{"affected":"3 open source packages ship an affected version, including mcp-server-git. It affects 1 product.","exploited":"There is no known exploitation of CVE-2025-68145 in the wild and no public exploit code.","fix":"Upgrade mcp-server-git to 2025.12.18 or later.","what":"CVE-2025-68145 is a medium-severity path traversal vulnerability in modelcontextprotocol servers, published on 17 Dec 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-68145 and fix it if it is affected.\n\nWhat it is: CVE-2025-68145 is a medium-severity path traversal vulnerability in modelcontextprotocol servers, published on 17 Dec 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-68145 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- mcp-server-git (PyPI): affected all versions; fixed in 2025.12.18\n- mcp-server-git (PyPI): affected all versions; fixed in 2025.12.18\n- mcp-server-git (PyPI): affected all versions; fixed in 2025.12.18\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-2025-68145/ (Markdown: https://insights.sbomify.com/CVE-2025-68145/index.md)","id":"CVE-2025-68145","markdown":"https://insights.sbomify.com/CVE-2025-68145/index.md","name":"CVE-2025-68145","record":{"aliases":["GHSA-j22h-9j4x-23w5","MINI-42c5-m8rr-5442","PYSEC-2026-1623"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":true,"product_category":"MCP Git server","requires_auth":"none","summary":"Attackers can access or modify unauthorized Git repositories by bypassing path restrictions in the mcp-server-git tool when configured with a specific repository flag.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"model_context_protocol_servers","vendor":"lfprojects"}],"cvss":{"score":6.4,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","version":"4.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"In mcp-server-git versions prior to 2025.12.17, when the server is started with the --repository flag to restrict operations to a specific repository path, it did not validate that repo_path arguments in subsequent tool calls were actually within that configured path. This could allow tool calls to operate on other repositories accessible to the server process. The fix adds path validation that resolves both the configured repository and the requested path (following symlinks) and verifies the requested path is within the allowed repository before executing any git operations. Users are advised to upgrade to 2025.12.17 upon release to remediate this issue.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"mcp-server-git has missing path validation when using --repository flag","id":"CVE-2025-68145","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":3,"n_references":1,"next":{"headline":"filelock has TOCTOU race condition that allows symlink attacks during lock file creation","id":"CVE-2025-68146"},"packages":[{"ecosystem":"PyPI","fixed":["2025.12.18"],"introduced":["0"],"last_affected":[],"package":"mcp-server-git","purl":null,"source":"GHSA-j22h-9j4x-23w5"},{"ecosystem":"PyPI","fixed":["2025.12.18"],"introduced":["0"],"last_affected":[],"package":"mcp-server-git","purl":"pkg:pypi/mcp-server-git","source":"GHSA-j22h-9j4x-23w5"},{"ecosystem":"PyPI","fixed":["2025.12.18"],"introduced":["0"],"last_affected":[],"package":"mcp-server-git","purl":"pkg:pypi/mcp-server-git","source":"PYSEC-2026-1623"}],"prev":{"headline":"mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files","id":"CVE-2025-68144"},"products":["servers"],"published":"2025-12-17","related":[{"cvss_score":6.5,"headline":"mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations","id":"CVE-2025-68143","kev_date_added":null,"published":"2025-12-17"},{"cvss_score":6.4,"headline":"mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries","id":"CVE-2026-27735","kev_date_added":null,"published":"2026-02-25"},{"cvss_score":6.3,"headline":"mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files","id":"CVE-2025-68144","kev_date_added":null,"published":"2025-12-17"}],"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":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-12-18","vendors":["modelcontextprotocol"]},"summary":"Attackers can access or modify unauthorized Git repositories by bypassing path restrictions in the mcp-server-git tool when configured with a specific repository flag.","url":"https://insights.sbomify.com/CVE-2025-68145/"}