FreeIPA Anonymous OTP ACI Abuse — Unauthenticated Kerberos Principal Injection and Admin Takeover (CVE-2026-76578)
Published: 2026-11-25 • Researcher: BrainBob (GitHub PoC author); Red Hat Product Security (advisory and errata)
- Severity
- Critical
- CVE
- CVE-2026-76578 (companion flaw: CVE-2026-76560 in 389-ds-base)
- Category
- network
- Affected product
- FreeIPA (ipa-server) self-managed OTP token ACI under cn=otp, evaluated by the 389-ds-base directory server
- Affected versions
- FreeIPA 4.9.x through 4.13.3 (fixed in 4.13.4, per upstream README); 389-ds-base before 3.2.0-10.el10_2 on RHEL 10 (RHSA-2026:64785) and the corresponding RHEL 9 build. The NVD record in the worklist lists no product or version ranges — See references.
- Disclosed
- 2026-11-25
- Patch status
- Unverified
Tags
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-76578
- https://github.com/BrainBob/CVE-2026-76578
- https://access.redhat.com/errata/RHSA-2026:70564
- https://access.redhat.com/errata/RHSA-2026:72279
- https://access.redhat.com/errata/RHSA-2026:82935
- https://access.redhat.com/errata/RHSA-2026:83083
- https://access.redhat.com/errata/RHSA-2026:83084
- https://access.redhat.com/errata/RHSA-2026:83085
- https://access.redhat.com/errata/RHSA-2026:64785
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-25 |
| Last Updated | 2026-09-09 |
| Author / Researcher | BrainBob (GitHub PoC author); Red Hat Product Security (advisory and errata) |
| CVE / Advisory | CVE-2026-76578 (companion flaw: CVE-2026-76560 in 389-ds-base) |
| Category | network |
| Severity | Critical |
| CVSS Score | 9.8 (per NVD; full vector not supplied in the worklist — See references) |
| Status | Weaponized |
| Tags | FreeIPA, LDAP, Kerberos, authentication-bypass, ACI, unauthenticated, privilege-escalation, 389-ds, identity-management, CWE-306 |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | FreeIPA (ipa-server) self-managed OTP token ACI under cn=otp, evaluated by the 389-ds-base directory server |
| Versions Affected | FreeIPA 4.9.x through 4.13.3 (fixed in 4.13.4, per upstream README); 389-ds-base before 3.2.0-10.el10_2 on RHEL 10 (RHSA-2026:64785) and the corresponding RHEL 9 build. The NVD record in the worklist lists no product or version ranges — See references. |
| Language / Platform | Python 3 (python-ldap client) plus shell; target is Linux (Fedora 44 / RHEL 9-10) running FreeIPA and 389-ds |
| Authentication Required | No — the attack starts with an anonymous LDAP bind and an anonymous ADD |
| Network Access Required | Yes — LDAP 389/636 and Kerberos 88 must be reachable from the attacker host |
Summary
CVE-2026-76578 is a missing-authentication flaw in FreeIPA’s self-managed OTP token ACI. The ACI allows anonymous clients to add token entries under cn=otp and does not restrict which attributes may accompany the entry, so an unauthenticated LDAP client can inject attributes such as userPassword, krbPrincipalAux and krbCanonicalName. Combined with a related 389-ds-base ACI evaluation flaw tracked as CVE-2026-76560, which treats an empty string as the anonymous bind DN and so satisfies the ipatokenOwner SELFDN check, the attacker can have the directory server generate a Kerberos key from the supplied password and obtain a TGT whose canonical name is a real administrator. The result is genuine FreeIPA administrator-group membership and full administrative control of the directory, without any prior credentials.
Vulnerability Details
Root Cause
FreeIPA ships an ACI that lets a user manage their own OTP token entry under cn=otp. That ACI lacks a targetattr allowlist, so an anonymous ADD through it may carry arbitrary attributes instead of only the token attributes the design intended. A second, separately tracked defect in the 389-ds-base SELFDN evaluator (CVE-2026-76560) considers the empty string a match for the anonymous bind DN, which defeats the ipatokenOwner ownership comparison. Because the added entry can also carry inetOrgPerson and krbPrincipalAux, the 389-ds ipapwd plugin will generate krbPrincipalKey server-side from the attacker’s userPassword, encrypted with the realm master key, so no captured key material is needed.
Attack Vector
An unauthenticated attacker with network access to the directory performs an anonymous simple bind and an LDAP ADD of an entry such as ipatokenuniqueid=pwn-…,cn=otp,… containing objectClass ipaToken, ipatokenTOTP, krbPrincipalAux and inetOrgPerson, an empty ipatokenOwner and managedBy, a chosen userPassword, a past krbLastPwdChange and a future krbPasswordExpiration, and krbPrincipalName. The same ADD can set krbCanonicalName to the real administrator principal (for example admin@REALM), which the Kerberos uniqueness plugin does not cover for cn=otp. The attacker then runs kinit with the chosen password; with canonicalize enabled the KDC issues a TGT whose canonical name is the administrator, and a GSSAPI LDAP bind resolves to the real uid=admin directory entry. The PoC automates the three stages: token creation with server-side key generation, GSSAPI bind, and the krbCanonicalName collision that yields admin-group rights.
Impact
Remote, unauthenticated takeover of the FreeIPA domain. An attacker obtains a genuine Kerberos TGT for an administrator principal, binds to LDAP as uid=admin, and inherits membership in cn=admins, allowing arbitrary directory administration (users, groups, HBAC/Sudo rules, certificates, DNS) and, on SID-enabled deployments, access to other IdM services. No group modification is required, so the compromise leaves the legitimate admin entry untouched and can be hard to spot. The upstream PoC reports all three levels confirmed against FreeIPA 4.13.1 on Fedora 44.
Environment / Lab Setup
OS: Fedora 44 x86_64 (target); Kali Linux (attacker, external, no domain membership)
Target: freeipa-server-4.13.1-9.fc44 with 389-ds-base-3.2.0-15.fc44,
krb5-libs 1.21.x, realm TEST.LOCAL, domain test.local,
host ipa-master.test.local at 192.168.1.11
Attacker: Kali Linux with python3-ldap, krb5-user, ldap-utils,
libsasl2-modules-gssapi-mit
Tools: poc.py, setup_lab.sh, kinit/klist, ldapsearch, GSSAPISetup Steps
| |
Proof of Concept
Step-by-Step Reproduction
- Prepare the vulnerable lab — deploy FreeIPA 4.13.1 (or any 4.9.x-4.13.3) with an unpatched 389-ds-base and confirm that anonymous LDAP bind is allowed, as setup_lab.sh does.
- Configure the attacker host — install python3-ldap and krb5-user, add the IPA hostname to /etc/hosts, and point /etc/krb5.conf at the realm with canonicalize enabled.
- Run the PoC — pass the target IP, IPA hostname and realm; the script performs an anonymous bind, then the ADD under cn=otp with an empty ipatokenOwner plus userPassword and Kerberos attributes, then kinit with the chosen password.
- Confirm level 1 and 2 — a TGT is issued and a GSSAPI LDAP bind succeeds, proving the injected principal is a real directory identity.
- Confirm level 3 — a second ADD sets krbCanonicalName to admin@REALM, kinit returns a TGT whose default principal is admin, the GSSAPI bind resolves to uid=admin, and a search of cn=admins shows uid=admin as a member.
Exploit Code
See
poc.pyfor the full three-stage exploit andsetup_lab.shfor the vulnerable lab deployment.
| |
Expected Output
── TEST 1: Anonymous ADD — server-side krbPrincipalKey generation ───
[+] ADD succeeded: ipatokenuniqueid=pwn-...,cn=otp,dc=test,dc=local
[+] Server generated krbPrincipalKey from userPassword (ipapwd plugin)
[+] TGT obtained — LEVEL 1 CONFIRMED
Default principal: pwn-...@TEST.LOCAL
── TEST 2: GSSAPI LDAP bind ─────────────────────────────────────────
[+] GSSAPI bind succeeded: dn: ipatokenuniqueid=pwn-...,cn=otp,...
[+] LEVEL 2 CONFIRMED
── TEST 3: krbCanonicalName=admin collision ──────────────────────────
[+] ADD with krbCanonicalName=admin@TEST.LOCAL succeeded
[+] TGT obtained — ticket claims principal: admin@TEST.LOCAL
[+] TGT cname is admin — LEVEL 3 CONFIRMED
[+] GSSAPI bind: dn: uid=admin,cn=users,cn=accounts,dc=test,dc=local
[+] uid=admin is member of cn=admins — real admin rights confirmed
============================================================
CVE-2026-76578 — Result Summary
============================================================
Level 1 — Server-side krbPrincipalKey + TGT [✓] CONFIRMED
Level 2 — GSSAPI LDAP / Kerberos auth [✓] CONFIRMED
Level 3 — Real admin group membership [✓] CONFIRMED
Full zero-credential compromise chain reproduced.
No pre-captured blob required.
============================================================Detection & Indicators of Compromise
- 389-ds access logs showing an ADD under cn=otp from an anonymous connection, especially entries whose ipatokenOwner or managedBy value is empty.
- OTP token entries that carry inetOrgPerson, krbPrincipalAux, userPassword, krbLastPwdChange or krbPasswordExpiration attributes, which normal enrollment does not add directly.
- krbCanonicalName values on cn=otp entries that name an existing human or administrative principal, particularly admin.
- KDC logs showing an AS-REQ for a newly created cn=otp principal followed by a TGT whose canonical name is a privileged account, and subsequent GSSAPI LDAP binds as uid=admin.
- Directory audit logs recording creation of cn=otp entries outside the normal IPA enrollment path, or from source addresses that are not IPA clients.
- Unexpected cn=admins membership queries or administrative operations performed immediately after anonymous token creation.
Example 389-ds access log line:
| |
SIEM query (example, illustrative — map to your own directory log pipeline):
| |
Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade FreeIPA to 4.13.4 or later, which adds a targetattr allowlist to the OTP ACI, and upgrade 389-ds-base to 3.2.0-10.el10_2 or the corresponding fixed RHEL 9 build (RHSA-2026:64785). Apply the FreeIPA errata listed in the NVD references (RHSA-2026:70564, 72279, 82935, 83083, 83084, 83085) as applicable. Both components must be fixed; either fix alone reduces but does not eliminate the chain. |
| Workaround | Restrict anonymous LDAP access to the rootDSE only (set nsslapd-allow-anonymous-access to rootdse) so unauthenticated ADDs under cn=otp are rejected, until both updates are applied. Alternatively, replace the OTP ACI with one that has an explicit targetattr allowlist and requires an authenticated bind, and audit existing cn=otp entries for unexpected attributes. |
| Config Hardening | Restrict LDAP 389/636 and Kerberos 88 to trusted networks, enforce TLS/LDAPS, alert on anonymous ADD operations under cn=otp, review cn=admins membership, and monitor KDC issuance of admin-canonicalized TGTs for non-admin principals. |
References
Notes
Auto-ingested from https://github.com/BrainBob/CVE-2026-76578 on 2026-11-25. Review verdict: this is a real exploit, not a detector. poc.py performs the anonymous LDAP ADD, kinit and GSSAPI bind that constitute the attack and reports level-by-level confirmation; setup_lab.sh builds the vulnerable Fedora/RHEL lab. Status is Weaponized because the upstream README documents a reproduced zero-credential chain with admin-group confirmation, but the archivist did not execute the code.
The repository has no license file, so the two source files are archived with attribution for authorized research only. Limitations: the chain depends on the separate 389-ds-base flaw CVE-2026-76560, so patching only one component is insufficient; it requires anonymous LDAP access plus reachable LDAP/Kerberos ports; and it was validated only against FreeIPA 4.13.1 / 389-ds-base 3.2.0-15.fc44 on Fedora 44, so behavior on other builds and non-default ACIs may differ. The upstream setup_lab.sh assumes root, SELinux permissive mode and a disposable VM, and its comments are in Russian. Use only against systems you own or have written authorization to test.
| |