# CVE-2026-126644: Ansible.posix: authorized_key module follows a parent-directory symlink allowing writes outside the intended directory

> A local user can plant a symlink so the authorized_key module writes or changes permissions in an attacker-chosen directory when run as root.

- **Severity:** Low 3.9 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Harmful if only installed:** No
- **Needs a specific call:** No
- **Fix available:** No
- **Published:** 12 Nov 2026
- **Updated:** 12 Nov 2026
- **Also known as:** GHSA-396m-42gr-rgx7

## What is CVE-2026-126644?

CVE-2026-126644 is a low-severity path traversal vulnerability in Red Hat Enterprise Linux 10, published on 12 Nov 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.

### Official 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 <target>/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.

Weakness: CWE-59 (Improper Link Resolution Before File Access)

## Which versions are affected by CVE-2026-126644?

An affected version is exposed as installed. No special setting or call is needed.


## How do I fix CVE-2026-126644?

No fix has been published for CVE-2026-126644 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-126644 being exploited?

There is no known exploitation of CVE-2026-126644 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-126644 and fix it if it is affected.

What it is: CVE-2026-126644 is a low-severity path traversal vulnerability in Red Hat Enterprise Linux 10, published on 12 Nov 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.
Exploitation: There is no known exploitation of CVE-2026-126644 in the wild and no public exploit code.
Exposure: An affected version is exposed as installed. No special setting or call is needed.

Affected product: Red Hat Enterprise Linux 10. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-126644/ (Markdown: https://insights.sbomify.com/CVE-2026-126644/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-126644
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-126644
- OSV: https://osv.dev/vulnerability/CVE-2026-126644

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-126644/
Summaries are generated and may contain mistakes; the official description above is the record.
