Executive brief
polkit is a system service used in Linux distributions to manage administrative privileges and allow non-privileged processes to communicate with privileged ones. A vulnerability exists where the service fails to properly handle specially crafted policy files containing deeply nested elements. If a high-privileged user or an attacker with administrative access places a malicious policy file on the system, it could cause the service to crash or potentially allow for the execution of unauthorized code, impacting system stability and security.
Technical details
A flaw was discovered in the polkit backend's XML parser, specifically within the `polkitbackendactionpool.c` component. When the parser encounters an XML policy file with 32 or more nested elements (exceeding `PARSER_MAX_DEPTH`), it triggers an out-of-bounds write due to insufficient bounds checking on the `stack_depth` variable. An attacker requires high privileges (e.g., root or a user capable of writing to polkit's policy directories) to place the malicious `.policy` file. Successful exploitation can lead to a denial-of-service (crash) of the polkit daemon or potentially arbitrary code execution. A fix has been committed to the upstream repository to enforce depth limits during parsing.
Affected products
- polkit-org polkit <= 126
- Red Hat Red Hat Enterprise Linux 8
- Red Hat Red Hat Enterprise Linux 9
- Red Hat Red Hat Enterprise Linux 10
- Red Hat Red Hat OpenShift Container Platform 4
Timeline
- 2025-06-06: other: Vulnerability reported by Med Maatallah
- 2025-07-05: patched: Fix merged into polkit main branch
- 2025-07-14: disclosed: CVE published
References
- https://www.freedesktop.org/software/polkit/releases/
- https://access.redhat.com/downloads/content/package-browser/
- https://access.redhat.com/security/cve/CVE-2025-7519
- https://bugzilla.redhat.com/show_bug.cgi?id=2379675
- https://github.com/polkit-org/polkit/commit/107d3801361b9f9084f78710178e683391f1d245
- https://github.com/polkit-org/polkit/pull/570