{"id":"UBUNTU-CVE-2026-28684","details":"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.","modified":"2026-05-20T16:12:18.200036238Z","published":"2026-04-20T17:16:00Z","upstream":["CVE-2026-28684"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-28684"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-28684"},{"type":"REPORT","url":"https://github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hr94"}],"affected":[{"package":{"name":"python-dotenv","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/python-dotenv?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.7.1-1.1"],"ecosystem_specific":{"binaries":[{"binary_version":"0.7.1-1.1","binary_name":"python3-dotenv"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28684.json"}},{"package":{"name":"python-dotenv","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/python-dotenv?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.1-1"],"ecosystem_specific":{"binaries":[{"binary_version":"0.9.1-1","binary_name":"python3-dotenv"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28684.json"}},{"package":{"name":"python-dotenv","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/python-dotenv?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.15.0-1","0.19.0-1","0.19.2-1"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-dotenv","binary_version":"0.19.2-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28684.json"}},{"package":{"name":"python-dotenv","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/python-dotenv?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.0-1","1.0.1-1"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-dotenv","binary_version":"1.0.1-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28684.json"}},{"package":{"name":"python-dotenv","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/python-dotenv?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.1-1"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-dotenv","binary_version":"1.0.1-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28684.json"}},{"package":{"name":"python-dotenv","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/python-dotenv?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.1-1","1.0.1-1build1"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-dotenv","binary_version":"1.0.1-1build1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28684.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}