Base · Medium

CWE-289: Authentication Bypass by Alternate Name

The product performs authentication based on the name of a resource being accessed, or the name of the actor performing the access, but it does not properly check all possible names for that resource...

CWE-289 · Base Level ·2 CVEs ·3 Mitigations

Description

The product performs authentication based on the name of a resource being accessed, or the name of the actor performing the access, but it does not properly check all possible names for that resource or actor.

Potential Impact

Access Control

Bypass Protection Mechanism

Mitigations & Prevention

Architecture and Design

Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.

Implementation

Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across relat

Implementation

Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

Detection Methods

  • Automated Static Analysis — Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then sea

Real-World CVE Examples

CVE IDDescription
CVE-2003-0317Protection mechanism that restricts URL access can be bypassed using URL encoding.
CVE-2004-0847web framework for .NET allows remote attackers to bypass authentication for .aspx files in restricted directories via a request containing a (1) "\" (backslash) or (2) "%5C" (encoded backslash)

Taxonomy Mappings

  • PLOVER: — Authentication bypass by alternate name
  • The CERT Oracle Secure Coding Standard for Java (2011): IDS01-J — Normalize strings before validating them
  • SEI CERT Oracle Coding Standard for Java: IDS01-J — Normalize strings before validating them

Frequently Asked Questions

What is CWE-289?

CWE-289 (Authentication Bypass by Alternate Name) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The product performs authentication based on the name of a resource being accessed, or the name of the actor performing the access, but it does not properly check all possible names for that resource...

How can CWE-289 be exploited?

Attackers can exploit CWE-289 (Authentication Bypass by Alternate Name) to bypass protection mechanism. This weakness is typically introduced during the Architecture and Design, Implementation phase of software development.

How do I prevent CWE-289?

Key mitigations include: Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.

What is the severity of CWE-289?

CWE-289 is classified as a Base-level weakness (Medium abstraction). It has been observed in 2 real-world CVEs.