Improper Authentication

Draft Class
Structure: Simple
Description

When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.

When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
Common Consequences 1
Scope: IntegrityConfidentialityAvailabilityAccess Control

Impact: Read Application DataGain Privileges or Assume IdentityExecute Unauthorized Code or Commands

This weakness can lead to the exposure of resources or functionality to unintended actors, possibly providing attackers with sensitive information or even execute arbitrary code.

Detection Methods 9
Automated Static AnalysisLimited
Automated static analysis is useful for detecting certain types of authentication. A tool may be able to analyze related configuration files, such as .htaccess in Apache web servers, or detect the usage of commonly-used authentication libraries. Generally, automated static analysis tools have difficulty detecting custom authentication schemes. In addition, the software's design may include some functionality that is accessible to any user and does not require an established identity; an automated technique that detects the absence of authentication may report false positives.
Manual Static AnalysisHigh
This weakness can be detected using tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. Manual static analysis is useful for evaluating the correctness of custom authentication mechanisms.
Manual Static Analysis - Binary or BytecodeSOAR Partial
According to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies
Dynamic Analysis with Automated Results InterpretationSOAR Partial
According to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Web Application Scanner Web Services Scanner Database Scanners
Dynamic Analysis with Manual Results InterpretationSOAR Partial
According to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Fuzz Tester Framework-based Fuzzer
Manual Static Analysis - Source CodeSOAR Partial
According to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Manual Source Code Review (not inspections)
Automated Static Analysis - Source CodeSOAR Partial
According to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer
Automated Static AnalysisSOAR Partial
According to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Configuration Checker
Architecture or Design ReviewHigh
According to SOAR [REF-1479], the following detection techniques may be useful: ``` Highly cost effective: ``` Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.) Formal Methods / Correct-By-Construction
Potential Mitigations 1
Phase: Architecture and Design

Strategy: Libraries or Frameworks

Use an authentication framework or library such as the OWASP ESAPI Authentication feature.
Demonstrative Examples 3
The following code intends to ensure that the user is already logged in. If not, the code performs authentication with the user-provided username and password. If successful, it sets the loggedin and user cookies to "remember" that the user has already logged in. Finally, the code performs administrator tasks if the logged-in user has the "Administrator" username, as recorded in the user cookie.

Code Example:

Bad
Perl
perl
Unfortunately, this code can be bypassed. The attacker can set the cookies independently so that the code does not check the username and password. The attacker could do this with an HTTP request containing headers such as:

Code Example:

Attack
bash
By setting the loggedin cookie to "true", the attacker bypasses the entire authentication check. By using the "Administrator" value in the user cookie, the attacker also gains privileges to administer the software.

ID : DX-117

In January 2009, an attacker was able to gain administrator access to a Twitter server because the server did not restrict the number of login attempts [REF-236]. The attacker targeted a member of Twitter's support team and was able to successfully guess the member's password using a brute force attack by guessing a large number of common words. After gaining access as the member of the support staff, the attacker used the administrator panel to gain access to 33 accounts that belonged to celebrities and politicians. Ultimately, fake Twitter messages were sent that appeared to come from the compromised accounts.

ID : DX-153

In 2022, the OT:ICEFALL study examined products by 10 different Operational Technology (OT) vendors. The researchers reported 56 vulnerabilities and said that the products were "insecure by design" [REF-1283]. If exploited, these vulnerabilities often allowed adversaries to change how the products operated, ranging from denial of service to changing the code that the products executed. Since these products were often used in industries such as power, electrical, water, and others, there could even be safety implications.
Multiple vendors did not use any authentication or used client-side authentication for critical functionality in their OT products.
Observed Examples 33
CVE-2024-11680File-sharing PHP product does not check if user is logged in during requests for PHP library files under an includes/ directory, allowing configuration changes, code execution, and other impacts.
CVE-2022-35248Chat application skips validation when Central Authentication Service (CAS) is enabled, effectively removing the second factor from two-factor authentication
CVE-2022-36436Python-based authentication proxy does not enforce password authentication during the initial handshake, allowing the client to bypass authentication by specifying a 'None' authentication type.
CVE-2022-30034Chain: Web UI for a Python RPC framework does not use regex anchors to validate user login emails (Regular Expression without Anchors), potentially allowing bypass of OAuth (Weak Authentication).
CVE-2022-29951TCP-based protocol in Programmable Logic Controller (PLC) has no authentication.
CVE-2022-29952Condition Monitor uses a protocol that does not require authentication.
CVE-2022-30313Safety Instrumented System uses proprietary TCP protocols with no authentication.
CVE-2022-30317Distributed Control System (DCS) uses a protocol that has no authentication.
CVE-2022-33139SCADA system only uses client-side authentication, allowing adversaries to impersonate other users.
CVE-2021-3116Chain: Python-based HTTP Proxy server uses the wrong boolean operators (Use of Incorrect Operator) causing an incorrect comparison (Incorrect Comparison) that identifies an authN failure if all three conditions are met instead of only one, allowing bypass of the proxy authentication (Weak Authentication)
CVE-2021-21972Chain: Cloud computing virtualization platform does not require authentication for upload of a tar format file (Missing Authentication for Critical Function), then uses .. path traversal sequences (Relative Path Traversal) in the file to access unexpected files, as exploited in the wild per CISA KEV.
CVE-2021-37415IT management product does not perform authentication for some REST API requests, as exploited in the wild per CISA KEV.
CVE-2021-35033Firmware for a WiFi router uses a hard-coded password for a BusyBox shell, allowing bypass of authentication through the UART port
CVE-2020-10263Bluetooth speaker does not require authentication for the debug functionality on the UART port, allowing root shell access
CVE-2020-13927Default setting in workflow management product allows all API requests without authentication, as exploited in the wild per CISA KEV.
CVE-2021-35395Stack-based buffer overflows in SFK for wifi chipset used for IoT/embedded devices, as exploited in the wild per CISA KEV.
CVE-2021-34523Mail server does not properly check an access token before executing a Powershell command, as exploited in the wild per CISA KEV.
CVE-2020-12812Chain: user is not prompted for a second authentication factor (Improper Authentication) when changing the case of their username (Improper Handling of Case Sensitivity), as exploited in the wild per CISA KEV.
CVE-2020-10148Authentication bypass by appending specific parameters and values to a URI, as exploited in the wild per CISA KEV.
CVE-2020-0688Mail server does not generate a unique key during installation, as exploited in the wild per CISA KEV.
CVE-2017-14623LDAP Go package allows authentication bypass using an empty password, causing an unauthenticated LDAP bind
CVE-2009-3421login script for guestbook allows bypassing authentication by setting a "login_ok" parameter to 1.
CVE-2009-2382admin script allows authentication bypass by setting a cookie value to "LOGGEDIN".
CVE-2009-1048VOIP product allows authentication bypass using 127.0.0.1 in the Host header.
CVE-2009-2213product uses default "Allow" action, instead of default deny, leading to authentication bypass.
CVE-2009-2168chain: redirect without exit (Execution After Redirect (EAR)) leads to resultant authentication bypass.
CVE-2009-3107product does not restrict access to a listening port for a critical service, allowing authentication to be bypassed.
CVE-2009-1596product does not properly implement a security-related configuration setting, allowing authentication bypass.
CVE-2009-2422authentication routine returns "nil" instead of "false" in some situations, allowing authentication bypass using an invalid username.
CVE-2009-3232authentication update script does not properly handle when admin does not select any authentication modules, allowing authentication bypass.
CVE-2009-3231use of LDAP authentication with anonymous binds causes empty password to result in successful authentication
CVE-2005-3435product authentication succeeds if user-provided MD5 hash matches the hash in its database; this can be subjected to replay attacks.
CVE-2005-0408chain: product generates predictable MD5 hashes using a constant value combined with username, allowing authentication bypass.
References 6
Weak Password Brings 'Happiness' to Twitter Hacker
Kim Zetter
09-01-2009
ID: REF-236
Top 10 2007-Broken Authentication and Session Management
OWASP
2007
ID: REF-237
Guide to Authentication
OWASP
ID: REF-238
Writing Secure Code
Michael Howard and David LeBlanc
Microsoft Press
04-12-2002
ID: REF-7
OT:ICEFALL: The legacy of "insecure by design" and its implications for certifications and risk management
Forescout Vedere Labs
20-06-2022
ID: REF-1283
Likelihood of Exploit

High

Applicable Platforms
Languages:
Not Language-Specific : Undetermined
Technologies:
ICS/OT : Often
Modes of Introduction
Architecture and Design
Implementation
Alternate Terms

authentification

An alternate term is "authentification", which appears to be most commonly used by people from non-English-speaking countries.

AuthN

"AuthN" is typically used as an abbreviation of "authentication" within the web application security community. It is also distinct from "AuthZ," which is an abbreviation of "authorization." The use of "Auth" as an abbreviation is discouraged, since it could be used for either authentication or authorization.

AuthC

"AuthC" is used as an abbreviation of "authentication," but it appears to used less frequently than "AuthN."
Functional Areas
  1. Authentication
Taxonomy Mapping
  • PLOVER
  • OWASP Top Ten 2007
  • OWASP Top Ten 2004
  • WASC
  • ISA/IEC 62443
  • ISA/IEC 62443
  • ISA/IEC 62443
  • ISA/IEC 62443
Notes
RelationshipThis can be resultant from SQL injection vulnerabilities and other issues.
MaintenanceThe Taxonomy_Mappings to ISA/IEC 62443 were added in CWE 4.10, but they are still under review and might change in future CWE versions. These draft mappings were performed by members of the "Mapping CWE to 62443" subgroup of the CWE-CAPEC ICS/OT Special Interest Group (SIG), and their work is incomplete as of CWE 4.10. The mappings are included to facilitate discussion and review by the broader ICS/OT community, and they are likely to change in future CWE versions.