Description
Using an empty string as a password is insecure.
Potential Impact
Access Control
Gain Privileges or Assume Identity
Demonstrative Examples
# Java Web App ResourceBundle properties file
...webapp.ldap.username=secretUsernamewebapp.ldap.password=......<connectionStrings><add name="ud_DEV" connectionString="connectDB=uDB; uid=db2admin; pwd=; dbalias=uDB;" providerName="System.Data.Odbc" /></connectionStrings>...Mitigations & Prevention
Passwords should be at least eight characters long -- the longer the better. Avoid passwords that are in any way similar to other passwords you have. Avoid using words that may be found in a dictionary, names book, on a map, etc. Consider incorporating numbers and/or punctuation into your password. If you do use common words, consider replacing letters in that word with numbers and punctuation. However, do not use "similar-looking" punctuation. For example, it is not a good idea to change cat to
Real-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2022-26117 | Network access control (NAC) product has a configuration file with an empty password |
Related Weaknesses
Taxonomy Mappings
- 7 Pernicious Kingdoms: — Password Management: Empty Password in Configuration File
Frequently Asked Questions
What is CWE-258?
CWE-258 (Empty Password in Configuration File) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. Using an empty string as a password is insecure.
How can CWE-258 be exploited?
Attackers can exploit CWE-258 (Empty Password in Configuration File) to gain privileges or assume identity. This weakness is typically introduced during the Architecture and Design, Implementation, Operation phase of software development.
How do I prevent CWE-258?
Key mitigations include: Passwords should be at least eight characters long -- the longer the better. Avoid passwords that are in any way similar to other passwords you have. Avoid using words that may be found in a dictionar
What is the severity of CWE-258?
CWE-258 is classified as a Variant-level weakness (Low-Medium abstraction). It has been observed in 1 real-world CVEs.