{"answers":{"affected":"3 open source packages ship an affected version, including python-dotenv. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-28684 exists.","fix":"Upgrade python-dotenv to 1.2.2 or later.","what":"CVE-2026-28684 is a medium-severity path traversal vulnerability in theskumar python-dotenv, published on 20 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-28684 and fix it if it is affected.\n\nWhat it is: CVE-2026-28684 is a medium-severity path traversal vulnerability in theskumar python-dotenv, published on 20 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-28684 exists.\n\nAffected packages and fixed versions:\n- python-dotenv (PyPI): affected all versions; fixed in 1.2.2\n- python-dotenv (PyPI): affected all versions; fixed in 1.2.2\n- python-dotenv (PyPI): affected all versions; fixed in 1.2.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/CVE-2026-28684/ (Markdown: https://insights.sbomify.com/CVE-2026-28684/index.md)","id":"CVE-2026-28684","markdown":"https://insights.sbomify.com/CVE-2026-28684/index.md","name":"CVE-2026-28684","record":{"aliases":["CLEANSTART-2026-GV24455","CLEANSTART-2026-TX03176","DEBIAN-CVE-2026-28684","ECHO-f84b-10a2-6d9d","GHSA-mf9w-mj56-hr94","MINI-27fv-mh5x-464v","MINI-6r5f-qcqf-q452","MINI-6vf3-g9f5-xq7w","MINI-9jx5-c8wg-p6ff","MINI-c53q-8g6j-gfrc","MINI-cmhj-2469-77cx","MINI-m7gg-r6wh-w5vx","MINI-mhr4-p5hc-8gcq","MINI-qcrj-4fgf-87jg","MINI-r2xw-9r4p-48gw","MINI-rhfq-4652-3f62","MINI-w85c-6q68-r6r9","OESA-2026-2198","OESA-2026-2199","OESA-2026-2324","PYSEC-2026-2270","ROOT-APP-PYPI-CVE-2026-28684","SUSE-SU-2026:22118-1","SUSE-SU-2026:2724-1","UBUNTU-CVE-2026-28684","openSUSE-SU-2026:20952-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python dotenv library","requires_auth":"low_privilege","summary":"A local attacker can overwrite arbitrary files by exploiting symlink following in python-dotenv's set_key function during cross-device rename operations.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"python-dotenv","vendor":"saurabh-kumar"}],"cvss":{"score":6.6,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-61","name":"UNIX Symbolic Link (Symlink) Following"},{"id":"CWE-59","name":"Improper Link Resolution Before File Access"}],"description":"python-dotenv reads key-value pairs from a .env file and can set them as environment variables. Prior to version 1.2.2, `set_key()` and `unset_key()` in python-dotenv follow symbolic links when rewriting `.env` files, allowing a local attacker to overwrite arbitrary files via a crafted symlink when a cross-device rename fallback is triggered. Users should upgrade to v.1.2.2 or, as a workaround, apply the patch manually.","ecosystems":["PyPI","SUSE:Linux Enterprise Module for Python 3 15 SP7","SUSE:Linux Enterprise Server 16.0","SUSE:Linux Enterprise Server for SAP applications 16.0","openSUSE:Leap 16.0"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback","id":"CVE-2026-28684","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":7,"n_references":3,"next":{"headline":"Kimai: API invoice endpoint missing customer-level access control (IDOR)","id":"CVE-2026-28685"},"packages":[{"ecosystem":"PyPI","fixed":["1.2.2"],"introduced":["0"],"last_affected":[],"package":"python-dotenv","purl":null,"source":"GHSA-mf9w-mj56-hr94"},{"ecosystem":"PyPI","fixed":["1.2.2"],"introduced":["0"],"last_affected":[],"package":"python-dotenv","purl":"pkg:pypi/python-dotenv","source":"GHSA-mf9w-mj56-hr94"},{"ecosystem":"PyPI","fixed":["1.2.2"],"introduced":["0"],"last_affected":[],"package":"python-dotenv","purl":"pkg:pypi/python-dotenv","source":"PYSEC-2026-2270"},{"ecosystem":"SUSE:Linux Enterprise Module for Python 3 15 SP7","fixed":["1.0.0-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-python-dotenv","purl":"pkg:rpm/suse/python-python-dotenv\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Python%203%2015%20SP7","source":"SUSE-SU-2026:2724-1"},{"ecosystem":"SUSE:Linux Enterprise Server 16.0","fixed":["1.1.0-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-python-dotenv","purl":"pkg:rpm/suse/python-python-dotenv\u0026distro=SUSE%20Linux%20Enterprise%20Server%2016.0","source":"SUSE-SU-2026:22118-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP applications 16.0","fixed":["1.1.0-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-python-dotenv","purl":"pkg:rpm/suse/python-python-dotenv\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20applications%2016.0","source":"SUSE-SU-2026:22118-1"},{"ecosystem":"openSUSE:Leap 16.0","fixed":["1.1.0-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-python-dotenv","purl":"pkg:rpm/opensuse/python-python-dotenv\u0026distro=openSUSE%20Leap%2016.0","source":"openSUSE-SU-2026:20952-1"}],"prev":{"headline":"Gokapi: Stored XSS in SVG Hotlinks","id":"CVE-2026-28683"},"products":["python-dotenv"],"published":"2026-04-20","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":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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":"2026-04-20","vendors":["theskumar"]},"summary":"A local attacker can overwrite arbitrary files by exploiting symlink following in python-dotenv's set_key function during cross-device rename operations.","url":"https://insights.sbomify.com/CVE-2026-28684/"}