Description
The product uses an authentication algorithm that uses a single factor (e.g., a password) in a security context that should require more than one factor.
Potential Impact
Access Control
Bypass Protection Mechanism
Demonstrative Examples
unsigned char *check_passwd(char *plaintext) {ctext = simple_digest("sha1",plaintext,strlen(plaintext), ... );
//Login if hash matches stored hash
if (equal(ctext, secret_password())) {login_user();}}String plainText = new String(plainTextIn);MessageDigest encer = MessageDigest.getInstance("SHA");encer.update(plainTextIn);byte[] digest = password.digest();
//Login if hash matches stored hash
if (equal(digest,secret_password())) {login_user();}Mitigations & Prevention
Use multiple independent authentication schemes, which ensures that -- if one of the methods is compromised -- the system itself is still likely safe from compromise. For this reason, if multiple schemes are possible, they should be implemented and required -- especially if they are easy to use.
Real-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2022-35248 | Chat application skips validation when Central Authentication Service (CAS) is enabled, effectively removing the second factor from two-factor authentication |
Related Weaknesses
Taxonomy Mappings
- CLASP: — Using single-factor authentication
Frequently Asked Questions
What is CWE-308?
CWE-308 (Use of Single-factor Authentication) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The product uses an authentication algorithm that uses a single factor (e.g., a password) in a security context that should require more than one factor.
How can CWE-308 be exploited?
Attackers can exploit CWE-308 (Use of Single-factor Authentication) to bypass protection mechanism. This weakness is typically introduced during the Architecture and Design phase of software development.
How do I prevent CWE-308?
Key mitigations include: Use multiple independent authentication schemes, which ensures that -- if one of the methods is compromised -- the system itself is still likely safe from compromise. For this reason, if multiple sche
What is the severity of CWE-308?
CWE-308 is classified as a Base-level weakness (Medium abstraction). It has been observed in 1 real-world CVEs.