Bug 2523356 (CVE-2026-79678) - CVE-2026-79678 freeIPA: idm: freeipa: idp-add eval() reachable before authorization check allows environment disclosure and denial of service
Summary: CVE-2026-79678 freeIPA: idm: freeipa: idp-add eval() reachable before authori...
Keywords:
Status: NEW
Alias: CVE-2026-79678
Deadline: 2026-09-07
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-08-25 11:30 UTC by OSIDB Bzimport
Modified: 2026-09-07 11:51 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-08-25 11:30:20 UTC
A flaw was found in FreeIPA's idp-add command. ipapython.ipautil.template_str() 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 pre_callback, 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.


Note You need to log in before you can comment on or make changes to this bug.