Junglewise Threat Intelligence

CVE-2025-7519: polkit out-of-bounds write in XML policy parsing

CVE-2025-7519 · Severity: medium · CVSS 6.7 · Published 2025-07-14

Technologies: Red Hat Enterprise Linux 8, Red Hat OpenShift Container Platform 4, Red Hat Enterprise Linux 9, Polkit-Org Polkit, Red Hat Enterprise Linux 10. Vendors: Red Hat.

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

Related threats