CVE-2026-79678: Freeipa: idm: freeipa: idp-add eval() reachable before authorization check allows environment disclosure and denial of service

Published Aug 25, 2026
·
Updated

A flaw was found in FreeIPA's idp-add command, where insufficiently validated --organization/--base-url input reaches a constrained eval() call before the corresponding LDAP access control check is enforced. This allows any authenticated IPA principal, regardless of privilege level, to enumerate and read the environment variables of the affected server process and to cause denial of service via memory exhaustion.

Other sources

A flaw was found in FreeIPA's idp-add command. ipapython.ipautil.templatestr() evaluates any 'eval(...)' token found in a post-substitution string using Python's eval(). ipaserver/plugins/idp.py passes the caller-supplied --organization and --base-url values (ipaidporg/ipaidpbaseurl), which have no input validation, into this function via provider templates (okta, keycloak, microsoft). The LDAPCreate command framework runs this evaluation inside precallback, before the LDAP access control check that restricts idp-add to the 'External IdP server Administrators' privilege is ever evaluated. As a result, any authenticated IPA principal, regardless of privilege level, can trigger this evaluation.

The regular expression that locates the eval(...) token forbids parentheses inside the evaluated expression, which prevents invoking any function and therefore prevents code execution. However, using parenthesis-free short-circuit boolean expressions, an attacker can distinguish, via the JSON-RPC error code returned by the server, whether a guessed condition is true, and combined with parenthesis-free star and dict-unpacking syntax, this allows systematic enumeration and extraction of the entire environment of the affected server process, with no prior knowledge of variable names required. Separately, a short expression exploiting Python's right-associative exponentiation operator reliably exhausts the affected process's available memory within seconds, providing a cheap, repeatable denial-of-service primitive.

Both primitives are reachable by any authenticated IPA principal, not only those holding the privilege the idp-add command is nominally restricted to.

Red Hat

Affected Software

1 affected component
FreeIPA FreeIPA

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Restrict access to the JSON-RPC endpoint(s) that permit invoking FreeIPA's `idp-add` (via the `LDAPCreate` command framework) so that only the 'External IdP server Administrators' privilege can reach the pre_callback evaluation path.

  2. Compensating control

    Harden network/authorization so that any authenticated IPA principal cannot invoke the `idp-add` code path; ensure callers are authorized before the evaluation occurs in `LDAPCreate.pre_callback`.

  3. Operational

    After remediation, assume the affected server process environment may have been disclosed and restarted/recovered as needed (e.g., rotate any secrets that may have been present in environment variables) to mitigate potential impact from environment enumeration.

Event History

Aug 25, 2026
Data Sourced
via Red Hat·11:30 AM
DescriptionSeverityAffected Software
Sep 7, 2026
CVE Published
via MITRE·12:02 PM
Data Sourced
via MITRE·12:02 PM
DescriptionSeverityWeakness

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