# CVE-2024-1929: Local Root Exploit via Configuration Dictionary

> A local attacker can escalate privileges to root by manipulating D-Bus configuration parameters in dnf5daemon-server to load malicious shared libraries.

- **Severity:** High 7.5 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/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:** 8 May 2024
- **Updated:** 17 Sep 2024
- **Also known as:** AZL-40340, GHSA-px8m-3p25-24qw

## What is CVE-2024-1929?

CVE-2024-1929 is a high-severity vulnerability in Fedora dnf5daemon-server, published on 8 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Local Root Exploit via Configuration Dictionary  in dnf5daemon-server before 5.1.17 allows a malicious user to impact Confidentiality and Integrity via Configuration Dictionary.

There are issues with the D-Bus interface long before Polkit is invoked. The `org.rpm.dnf.v0.SessionManager.open_session` method takes a key/value map of configuration entries. A sub-entry in this map, placed under the "config" key, is another key/value map. The configuration values found in it will be forwarded as configuration overrides to the `libdnf5::Base` configuration. 

Practically all libdnf5 configuration aspects can be influenced here. Already when opening the session via D-Bus, the libdnf5 will be initialized using these override configuration values. There is no sanity checking of the content of this "config" map, which is untrusted data. It is possible to make the library loading a plug-in shared library under control of an unprivileged user, hence achieving root access.

Weakness: CWE-20 (Improper Input Validation)

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

It affects 1 product.


Products: Rpm Dnf5.

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

Upgrade to a fixed version.

## Is CVE-2024-1929 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2024-1929 is a high-severity vulnerability in Fedora dnf5daemon-server, published on 8 May 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-1929 exists.

Affected product: Fedora dnf5daemon-server. 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-1929/ (Markdown: https://insights.sbomify.com/CVE-2024-1929/index.md)
```

## Sources

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

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