# CVE-2024-47191: Path traversal in n/a

> A path traversal vulnerability in the oath-toolkit PAM module allows local attackers to escalate privileges to root via symlink mishandling.

- **Severity:** High 7.1 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Oct 2024
- **Updated:** 18 Oct 2024
- **Also known as:** AZL-50121, AZL-50124, DEBIAN-CVE-2024-47191, DSA-5784-1, GHSA-w8jp-q8g4-9f42, MGASA-2024-0335, RHSA-2025:3635, UBUNTU-CVE-2024-47191, USN-7059-1, USN-7059-2, openSUSE-SU-2024:14389-1

## What is CVE-2024-47191?

CVE-2024-47191 is a high-severity path traversal vulnerability in n/a, published on 9 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

pam_oath.so in oath-toolkit 2.6.7 through 2.6.11 before 2.6.12 allows root privilege escalation because, in the context of PAM code running as root, it mishandles usersfile access, such as by calling fchown in the presence of a symlink.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2024-47191?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ceph` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-base` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-base-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-common` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-common-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-debugsource` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-exporter-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-fuse` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-fuse-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-immutable-object-cache` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-immutable-object-cache-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-mds-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-mgr-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-mib` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-mon-client-nvmeof-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-mon-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-osd-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-radosgw-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-resource-agents` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-selinux` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `ceph-test-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `cephadm` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `cephfs-mirror-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `cephfs-top` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `libcephfs-daemon-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `libcephfs-devel` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `libcephfs-proxy2` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `libcephfs-proxy2-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `libcephfs2` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `libcephfs2-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `libcephsqlite-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `liboath` | Red Hat:ceph_storage:8.0::el9 | All versions | 0:2.6.12-1.el9cp |
| `liboath-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 0:2.6.12-1.el9cp |
| `libpskc-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 0:2.6.12-1.el9cp |
| `librados-devel` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `librados-devel-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `librados2` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `librados2-debuginfo` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |
| `libradospp-devel` | Red Hat:ceph_storage:8.0::el9 | All versions | 2:19.2.0-124.el9cp |

## How do I fix CVE-2024-47191?

Upgrade to a fixed version.

## Is CVE-2024-47191 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-47191 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-47191 and fix it if it is affected.

What it is: CVE-2024-47191 is a high-severity path traversal vulnerability in n/a, published on 9 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-47191 exists.

Affected product: n/a. 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-2024-47191/ (Markdown: https://insights.sbomify.com/CVE-2024-47191/index.md)
```

## Sources

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

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