{"answers":{"affected":"3 open source packages ship an affected version, including rembg. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40086 exists.","fix":"Upgrade rembg to 2.0.75 or later.","what":"CVE-2026-40086 is a medium-severity path traversal vulnerability in danielgatis rembg, published on 10 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-40086 and fix it if it is affected.\n\nWhat it is: CVE-2026-40086 is a medium-severity path traversal vulnerability in danielgatis rembg, published on 10 Apr 2026. 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-2026-40086 exists.\n\nAffected packages and fixed versions:\n- rembg (PyPI): affected all versions; fixed in 2.0.75\n- rembg (PyPI): affected all versions; fixed in 2.0.75\n- rembg (PyPI): affected all versions; fixed in 2.0.75\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-2026-40086/ (Markdown: https://insights.sbomify.com/CVE-2026-40086/index.md)","id":"CVE-2026-40086","markdown":"https://insights.sbomify.com/CVE-2026-40086/index.md","name":"CVE-2026-40086","record":{"aliases":["GHSA-3wqj-33cg-xc48","PYSEC-2026-2274"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Python background removal library","requires_auth":"none","summary":"Unauthenticated attackers can read arbitrary files from the server filesystem via a crafted model_path parameter in the Rembg HTTP server.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"rembg","vendor":"danielgatis"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-73","name":"External Control of File Name or Path"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"Rembg is a tool to remove images background. Prior to 2.0.75, a path traversal vulnerability in the rembg HTTP server allows unauthenticated remote attackers to read arbitrary files from the server's filesystem. By sending a crafted request with a malicious model_path parameter, an attacker can force the server to attempt loading any file as an ONNX model, revealing file existence, permissions, and potentially file contents through error messages. This vulnerability is fixed in 2.0.75.","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":"Rembg has a Path Traversal via Custom Model Loading","id":"CVE-2026-40086","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":3,"next":{"headline":"LangChain has incomplete f-string validation in prompt templates","id":"CVE-2026-40087"},"packages":[{"ecosystem":"PyPI","fixed":["2.0.75"],"introduced":["0"],"last_affected":[],"package":"rembg","purl":null,"source":"GHSA-3wqj-33cg-xc48"},{"ecosystem":"PyPI","fixed":["2.0.75"],"introduced":["0"],"last_affected":[],"package":"rembg","purl":"pkg:pypi/rembg","source":"GHSA-3wqj-33cg-xc48"},{"ecosystem":"PyPI","fixed":["2.0.75"],"introduced":["0"],"last_affected":[],"package":"rembg","purl":"pkg:pypi/rembg","source":"PYSEC-2026-2274"}],"prev":{"headline":"Cacti: Arbitrary File Read via Path Traversal in Report `format_file` Parameter","id":"CVE-2026-40084"},"products":["rembg"],"published":"2026-04-10","related":[{"cvss_score":8.7,"headline":"Rembg CORS misconfiguration","id":"CVE-2025-25302","kev_date_added":null,"published":"2025-03-03"},{"cvss_score":6.9,"headline":"Rembg allows SSRF via /api/remove","id":"CVE-2025-25301","kev_date_added":null,"published":"2025-03-03"}],"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":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-04-10","vendors":["danielgatis"]},"summary":"Unauthenticated attackers can read arbitrary files from the server filesystem via a crafted model_path parameter in the Rembg HTTP server.","url":"https://insights.sbomify.com/CVE-2026-40086/"}