Incorrect Implementation of Authentication Algorithm

Draft Base
Structure: Simple
Description

This weakness occurs when a developer implements a standard authentication algorithm, but makes critical mistakes in the code that cause it to function incorrectly.

Extended Description

Developers often rely on proven authentication algorithms like OAuth, SAML, or bcrypt, but a flawed implementation can render these strong protocols ineffective. Common errors include misusing cryptographic functions, incorrectly validating tokens or signatures, or mishandling session state, which creates hidden gaps in the security logic. These implementation flaws can allow attackers to bypass authentication entirely, gain unauthorized access, or escalate privileges. To prevent this, always use well-vetted libraries where possible, follow official implementation guides meticulously, and supplement with rigorous security testing that goes beyond functional checks to validate the actual security behavior.

Common Consequences 1
Scope: Access Control

Impact: Bypass Protection Mechanism

Observed Examples 1
CVE-2003-0750Conditional should have been an 'or' not an 'and'.
Applicable Platforms
Languages:
Not Language-Specific : Undetermined
Modes of Introduction
Implementation
Related Weaknesses
Taxonomy Mapping
  • PLOVER