CVE-2026-4897: Polkit: polkit: denial of service via unbounded input processing through standard input

Published Mar 26, 2026
·
Updated

A flaw was found in polkit. A local user can exploit this by providing a specially crafted, excessively long input to the polkit-agent-helper-1 setuid binary via standard input (stdin). This unbounded input can lead to an out-of-memory (OOM) condition, resulting in a Denial of Service (DoS) for the system.

Other sources

Polkit: polkit: denial of service via unbounded input processing through standard input

Microsoft

The helper supports two ways to receive the cookie: via argv[2] when argc == 3, or via stdin when argc == 2. The latter is the path used by the polkit agent when it spawns the setuid helper: it passes only the username and writes the cookie on stdin (to avoid exposing it in process listings, as per CVE-2015-4625). The problematic code is in src/polkitagent/polkitagenthelperprivate.c:

c if (argc == 3) return strdup (argv[2]); else { char ret = NULL; sizet n = 0; ssizet r = getline (&ret, &n, stdin); if (r == -1) { if (!feof (stdin)) perror ("getline"); free (ret); return NULL; } else { gstrchomp (ret); return ret; } }

There is no limit on the length of the line read from stdin. The helper checks that stdin is not a TTY when running as non-root (isatty (STDINFILENO) != 0 → error), but it does not reject other sources such as pipes. Moreover, in all helper variants (PAM, shadow, bsdauth), the isatty check is performed after readcookie() has already returned, so even if the check could somehow catch the attacker's input, the unbounded allocation would have already occurred. A local user can therefore run:

sh No newline: getline() keeps reallocating until OOM or ENOMEM python3 -c "print('A'200000000, end='')" | /usr/lib/polkit-1/polkit-agent-helper-1 $(whoami)

The setuid binary is installed with mode 04755 (see mesonpostinstall.py), so any local user can execute it. This affects all helper variants (PAM, shadow, bsdauth) because they share readcookie() in polkitagenthelperprivate.c. The stdin path was introduced in commit ea544ffc; releases from approximately 0.113 onward that use the setuid helper are affected. (Systems that use only the socket-activated helper and never run the setuid binary with user-controlled stdin are not exposed in practice.)

Red Hat

Affected Software

11 affected componentsFixes available
freedesktop.org polkit>=0.113
Microsoft azl3 polkit 123-3
Microsoft cbl2 polkit 0.119-4
Microsoft azl3 polkit 123-4
Freedesktop polkit
redhat OpenShift Container Platform=4.0
redhat Enterprise Linux=6.0
redhat Enterprise Linux=7.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
redhat Enterprise Linux=10.0

Event History

Mar 26, 2026
Data Sourced
via Red Hat·02:27 PM
DescriptionSeverityAffected Software
CVE Published
via MITRE·02:56 PM
Data Sourced
via MITRE·02:56 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 PM
DescriptionSeverityWeaknessAffected Software
Apr 2, 2026
Data Sourced
via Microsoft·08:05 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:05 AM
SeverityAffected Software
Updated
via Microsoft·08:05 AM
Affected Software
Updated
via Microsoft·08:05 AM
DescriptionSeverity
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-4897?

CVE-2026-4897 is classified as a denial of service vulnerability affecting polkit.

2

How do I fix CVE-2026-4897?

To mitigate CVE-2026-4897, ensure that you update polkit to the latest version that addresses the vulnerability.

3

Who is affected by CVE-2026-4897?

CVE-2026-4897 affects local users of systems running polkit versions 0.113 and earlier.

4

What type of attack is CVE-2026-4897 associated with?

CVE-2026-4897 is associated with a denial of service attack through unbounded input processing.

5

Can CVE-2026-4897 be exploited remotely?

No, CVE-2026-4897 can only be exploited by a local user with access to the system.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203