CWE-305: Authentication Bypass by Primary Weakness

What is CWE-305?

CWE-305 is Authentication Bypass by Primary Weakness. The flaw arises when the authentication algorithm is sound, but the implemented authentication mechanism can be bypassed because of a separate primary weakness that causes the authentication failure. The database currently holds 41 vulnerabilities mapped to CWE-305 and 1 of them are in the CISA Known Exploited Vulnerabilities catalog.

OWASP TOP 10:2025 RANK7 — A07:2025 — Authentication Failures
Related CVES (365 days)41
AbstractionBase
Likelihood of exploit-

Vulnerabilities mapped to CWE-305

41 vulnerabilities413% increase year over year

Vulnerabilities in CISA KEV for CWE-305

1 vulnerabilities

Official definition

ByMitre CWE

The authentication algorithm is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error.

Detailed description

A valid authentication algorithm does not ensure effective protection when another weakness alters, truncates, or otherwise undermines the implemented verification process. Because the primary weakness occurs in underlying implementation logic or state handling, an attacker may supply input that is accepted without satisfying the intended authentication requirements. Analysis should therefore address the root cause of the authentication failure, not only the nominal correctness of the authentication algorithm.

Characteristics

This is a simple, base-level weakness introduced during implementation, when an architectural security tactic is realized incorrectly. The authentication algorithm itself may be sound, while an underlying implementation defect, such as incomplete password comparison or improper data initialization, weakens the entire authentication mechanism. The record identifies it as not language-specific.

Common consequences

The primary consequence is an access-control impact: an attacker can bypass the protection mechanism provided by authentication. Successful exploitation may permit access that should require valid authentication, including administrative access in the representative example involving forum software.

ImpactScopeExplanation
Bypass Protection MechanismAccess Control-

Risk mitigations

The official CWE record does not specify mitigations for this weakness.

Detection methods

The official CWE record does not specify detection methods for this weakness.

Representative vulnerabilities

The following are representative examples in the CWE record, not an exhaustive list:

  • CVE-2002-1374: The supplied password was compared only with the first character of the real password.
  • CVE-2000-0979: The password was not checked correctly, allowing remote attackers to bypass access controls with a one-byte password matching the first character of the real password.
  • CVE-2001-0088: Forum software failed to initialize an array properly, inadvertently setting the password to a single character and allowing remote attackers to guess it easily and obtain administrative privileges.
Sources (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.