Passwords Stored in Active Directory Attributes
Passwords are written in plain text in user or computer object attributes, such as the description field, that every domain user can read.
| Severity | High |
| CVSS 3.1 | 8.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N Open in the calculator |
| CVSS 4.0 | 8.6 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-256: Plaintext Storage of a Password |
| OWASP Top 10 | A06:2025 Insecure Design |
| MITRE ATT&CK | T1552 Unsecured Credentials, T1078.002 Domain Accounts |
| Category | Information Disclosure |
Description
Passwords have been recorded in plain text in attributes of Active Directory objects. The most common location is the description attribute of user, service and computer accounts, where administrators note an initial or service password, followed by the info attribute (shown as Notes in Active Directory Users and Computers) and other free-text fields. Some UNIX integration and identity management tools also populate attributes such as userPassword, unixUserPassword or msSFU30Password with a password or password hash.
By default every authenticated domain user can read the description attribute of every account, so a password stored there is effectively shared with the whole organisation, and with anyone on the network where anonymous LDAP access is permitted. Other attributes may be readable just as widely, depending on the directory's permissions, and none of them is protected like the account's real password, which domain controllers never return over LDAP. Any domain user, or an attacker who has compromised one, can therefore collect these passwords without special tools or privileges and sign in as the accounts concerned.
Service accounts are frequently affected, and they often hold administrative rights over servers or the domain; user accounts noted with an initial password that was never changed are also exposed. The exposure lasts until each password is changed: removing the text from the attribute alone does not end it, because anyone may already have read it.
The issue is identified by retrieving these attributes for all objects over LDAP and searching them for terms such as pass, pwd and pw and for values that look like passwords, with PowerShell, ldapsearch, ldapdomaindump, BloodHound or NetExec, then confirming that a candidate password authenticates.
Remediation
- Change the password of every account whose password, current or past, was found in an attribute, starting with privileged and service accounts. Treat the passwords as compromised, since they may already have been read.
- Remove the passwords from the attributes, searching all object types rather than only users (see the example below).
- Store service and shared account passwords in a password manager or privileged access management system with access control and auditing, and replace service accounts with group managed service accounts where possible.
- Give new users their initial passwords by a separate channel and require a change at first sign-in, rather than recording them in the directory.
- Where UNIX integration attributes such as
userPasswordorunixUserPasswordare populated, establish whether they are still used, clear them if not, and restrict who can read them if they are. - Add a search for passwords in attributes to routine directory reviews and to the account provisioning process.
For example, to find candidate values in the description and Notes fields of every object:
Confirm the fix by repeating the search across all objects and testing that the passwords found previously no longer authenticate.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.