{"id":"CVE-2026-126644","aliases":["EUVD-2026-124343","GHSA-396m-42gr-rgx7","UBUNTU-CVE-2026-126644"],"status":"published","title":"Ansible.posix: authorized_key module follows a parent-directory symlink allowing writes outside the intended directory","description":"A link-following flaw was found in the authorized_key module of the ansible.posix collection, residual to the fix for CVE-2026-11837. That fix guards only the final path component (os.chown with follow_symlinks=False and O_NOFOLLOW in _safe_open_write()). When an unprivileged local user replaces their ~/.ssh directory with a symlink to a directory they do not own, and an operator subsequently runs the authorized_key task as root (a common provisioning pattern), the module resolves its path operations through the symlink: atomic_move() writes the temporary file in the symlink target and renames it to \u003ctarget\u003e/authorized_keys, creating or overwriting a file in the attacker-chosen directory, and os.chmod(sshdir, 0o700) follows the symlink and changes the target directory's permissions. The written file is chowned to the unprivileged user, so this is not a privilege escalation, but it allows an attacker to create or overwrite files (for example in /etc/apt/apt.conf.d/, which APT reads regardless of file ownership) to cause integrity and availability impacts.","severity":{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-13","score":0.00111,"percentile":0.01351,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-59"],"published":"2026-11-12T10:50:16Z","modified":"2026-11-13T21:05:25Z","affected":[{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"ansible","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.1+dfsg-1","1.3.4+dfsg-1","1.4.0+dfsg-1","1.4.1+dfsg-1","1.4.3+dfsg-1","1.4.4+dfsg-1","1.5.4+dfsg-1","1.5.4+dfsg-1ubuntu0.1~esm1","1.5.4+dfsg-1ubuntu0.1~esm2","1.5.4+dfsg-1ubuntu0.1~esm3"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"ansible","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.2+dfsg-2","1.9.4-1","2.0.0.2-2","2.0.0.2-2ubuntu1","2.0.0.2-2ubuntu1.1","2.0.0.2-2ubuntu1.2","2.0.0.2-2ubuntu1.3","2.0.0.2-2ubuntu1.3+esm1","2.0.0.2-2ubuntu1.3+esm2","2.0.0.2-2ubuntu1.3+esm3","2.0.0.2-2ubuntu1.3+esm4","2.0.0.2-2ubuntu1.3+esm5","2.0.0.2-2ubuntu1.3+esm6"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"ansible","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.3.1.0+dfsg-2","2.5.0+dfsg-1","2.5.1+dfsg-1","2.5.1+dfsg-1ubuntu0.1","2.5.1+dfsg-1ubuntu0.1+esm1","2.5.1+dfsg-1ubuntu0.1+esm2","2.5.1+dfsg-1ubuntu0.1+esm3","2.5.1+dfsg-1ubuntu0.1+esm4","2.5.1+dfsg-1ubuntu0.1+esm5"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"ansible","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8.3+dfsg-1","2.8.6+dfsg-1","2.9.2+dfsg-1","2.9.4+dfsg-1","2.9.6+dfsg-1","2.9.6+dfsg-1ubuntu0.1~esm1","2.9.6+dfsg-1ubuntu0.1~esm2","2.9.6+dfsg-1ubuntu0.1~esm3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"ansible-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.12.0-1","2.12.0-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"ansible","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.10.7+merged+base+2.10.8+dfsg-1","2.10.7+merged+base+2.10.8+dfsg-1ubuntu0.1~esm1","2.10.7+merged+base+2.10.8+dfsg-1ubuntu0.1~esm4"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"ansible","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["7.7.0+dfsg-1","7.7.0+dfsg-3","9.2.0+dfsg-0ubuntu4","9.2.0+dfsg-0ubuntu5"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"ansible-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.14.9-2","2.14.11-1","2.14.11-2","2.14.13-1","2.16.3-0ubuntu1","2.16.3-0ubuntu2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"ansible","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["13.1.0+dfsg-1ubuntu1","13.4.0+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"ansible-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.20.1-1","2.21.1~rc1-1","2.21.1~rc1-2","2.21.1~rc1-2ubuntu1","2.22.0~beta2-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"ansible","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["12.0.0~b1+dfsg-1","12.0.0+dfsg-1","12.2.0+dfsg-1","13.1.0+dfsg-1","13.1.0+dfsg-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"ansible-core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.19.0-1ubuntu1","2.19.4-1","2.20.1-1"]}],"products":[{"vendor":"red hat","product":"red hat enterprise linux 10"},{"vendor":"red hat","product":"red hat enterprise linux 9"}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2026-126644","tags":["vdb-entry","x_refsource_REDHAT","report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2571732","tags":["issue-tracking","x_refsource_REDHAT","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126644"},{"url":"https://github.com/advisories/GHSA-396m-42gr-rgx7"},{"url":"https://ubuntu.com/security/CVE-2026-126644","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-126644","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-126644","title":"Ansible.posix: authorized_key module follows a parent-directory symlink allowing writes outside the intended directory","description":"A link-following flaw was found in the authorized_key module of the ansible.posix collection, residual to the fix for CVE-2026-11837. That fix guards only the final path component (os.chown with follow_symlinks=False and O_NOFOLLOW in _safe_open_write()). When an unprivileged local user replaces their ~/.ssh directory with a symlink to a directory they do not own, and an operator subsequently runs the authorized_key task as root (a common provisioning pattern), the module resolves its path operations through the symlink: atomic_move() writes the temporary file in the symlink target and renames it to \u003ctarget\u003e/authorized_keys, creating or overwriting a file in the attacker-chosen directory, and os.chmod(sshdir, 0o700) follows the symlink and changes the target directory's permissions. The written file is chowned to the unprivileged user, so this is not a privilege escalation, but it allows an attacker to create or overwrite files (for example in /etc/apt/apt.conf.d/, which APT reads regardless of file ownership) to cause integrity and availability impacts.","status":"published","published":"2026-11-12T10:50:16.148Z","modified":"2026-11-13T18:33:43.281Z","cvss":[{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","level":"low","assessor":"cna"}],"cwes":["CWE-59"],"updated_at":"2026-11-12T11:41:48.134576Z"}],"euvd":[{"id":"EUVD-2026-124343","description":"A link-following flaw was found in the authorized_key module of the ansible.posix collection, residual to the fix for CVE-2026-11837. That fix guards only the final path component (os.chown with follow_symlinks=False and O_NOFOLLOW in _safe_open_write()). When an unprivileged local user replaces their ~/.ssh directory with a symlink to a directory they do not own, and an operator subsequently runs the authorized_key task as root (a common provisioning pattern), the module resolves its path operations through the symlink: atomic_move() writes the temporary file in the symlink target and renames it to \u003ctarget\u003e/authorized_keys, creating or overwriting a file in the attacker-chosen directory, and os.chmod(sshdir, 0o700) follows the symlink and changes the target directory's permissions. The written file is chowned to the unprivileged user, so this is not a privilege escalation, but it allows an attacker to create or overwrite files (for example in /etc/apt/apt.conf.d/, which APT reads regardless of file ownership) to cause integrity and availability impacts.","status":"published","published":"2026-11-12T10:50:16Z","modified":"2026-11-13T18:33:43Z","cvss":[{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","level":"low"}],"updated_at":"2026-11-12T14:33:51.925862Z"}],"ghsa":[{"id":"GHSA-396m-42gr-rgx7","title":"A link-following flaw was found in the authorized_key module of the ansible.posix collection,...","description":"A link-following flaw was found in the authorized_key module of the ansible.posix collection, residual to the fix for CVE-2026-11837. That fix guards only the final path component (os.chown with follow_symlinks=False and O_NOFOLLOW in _safe_open_write()). When an unprivileged local user replaces their ~/.ssh directory with a symlink to a directory they do not own, and an operator subsequently runs the authorized_key task as root (a common provisioning pattern), the module resolves its path operations through the symlink: atomic_move() writes the temporary file in the symlink target and renames it to \u003ctarget\u003e/authorized_keys, creating or overwriting a file in the attacker-chosen directory, and os.chmod(sshdir, 0o700) follows the symlink and changes the target directory's permissions. The written file is chowned to the unprivileged user, so this is not a privilege escalation, but it allows an attacker to create or overwrite files (for example in /etc/apt/apt.conf.d/, which APT reads regardless of file ownership) to cause integrity and availability impacts.","status":"published","published":"2026-11-12T12:31:36Z","modified":"2026-11-12T12:31:37Z","cvss":[{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","level":"low"}],"cwes":["CWE-59"],"updated_at":"2026-11-12T12:41:03.365003Z"}],"nvd":[{"id":"CVE-2026-126644","description":"A link-following flaw was found in the authorized_key module of the ansible.posix collection, residual to the fix for CVE-2026-11837. That fix guards only the final path component (os.chown with follow_symlinks=False and O_NOFOLLOW in _safe_open_write()). When an unprivileged local user replaces their ~/.ssh directory with a symlink to a directory they do not own, and an operator subsequently runs the authorized_key task as root (a common provisioning pattern), the module resolves its path operations through the symlink: atomic_move() writes the temporary file in the symlink target and renames it to \u003ctarget\u003e/authorized_keys, creating or overwriting a file in the attacker-chosen directory, and os.chmod(sshdir, 0o700) follows the symlink and changes the target directory's permissions. The written file is chowned to the unprivileged user, so this is not a privilege escalation, but it allows an attacker to create or overwrite files (for example in /etc/apt/apt.conf.d/, which APT reads regardless of file ownership) to cause integrity and availability impacts.","status":"published","published":"2026-11-12T11:17:11.77Z","modified":"2026-11-13T19:19:24.793Z","cvss":[{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","level":"low","assessor":"secondary"}],"cwes":["CWE-59"],"updated_at":"2026-11-13T21:37:35.121841Z"}],"osv":[{"id":"UBUNTU-CVE-2026-126644","description":"A link-following flaw was found in the authorized_key module of the ansible.posix collection, residual to the fix for CVE-2026-11837. That fix guards only the final path component (os.chown with follow_symlinks=False and O_NOFOLLOW in _safe_open_write()). When an unprivileged local user replaces their ~/.ssh directory with a symlink to a directory they do not own, and an operator subsequently runs the authorized_key task as root (a common provisioning pattern), the module resolves its path operations through the symlink: atomic_move() writes the temporary file in the symlink target and renames it to \u003ctarget\u003e/authorized_keys, creating or overwriting a file in the attacker-chosen directory, and os.chmod(sshdir, 0o700) follows the symlink and changes the target directory's permissions. The written file is chowned to the unprivileged user, so this is not a privilege escalation, but it allows an attacker to create or overwrite files (for example in /etc/apt/apt.conf.d/, which APT reads regardless of file ownership) to cause integrity and availability impacts.","status":"published","published":"2026-11-13T00:00:00Z","modified":"2026-11-13T21:05:25.41603548Z","cvss":[{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","level":"low"}],"updated_at":"2026-11-13T21:30:20.292037Z"}]}}
