CWE-306: Missing Authentication for Critical Function (Base)

Description: The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.

Extended Description: As data is migrated to the cloud, if access does not require authentication, it can be easier for attackers to access the data from anywhere on the Internet.



Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Cloud Computing:TECHNOLOGY PREVALENCE:Undetermined::TECHNOLOGY CLASS:ICS/OT:TECHNOLOGY PREVALENCE:Often::

Modes of Introduction: ::PHASE:Architecture and Design:NOTE:OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.::



Common Consequences: ::SCOPE:Access Control:SCOPE:Other:IMPACT:Gain Privileges or Assume Identity:IMPACT:Other:NOTE:Exposing critical functionality essentially provides an attacker with the privilege level of that functionality. The consequences will depend on the associated functionality, but they can range from reading or modifying sensitive data, access to administrative or other privileged functionality, or possibly even execution of arbitrary code.::

Detection Methods: ::METHOD:Manual Analysis:DESCRIPTION: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. Specifically, manual static analysis is useful for evaluating the correctness of custom authentication mechanisms.::METHOD:Automated Static Analysis:DESCRIPTION:Automated static analysis is useful for detecting commonly-used idioms for 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.:EFFECTIVENESS:Limited::METHOD:Manual Static Analysis - Binary or Bytecode:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Automated Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Web Application Scanner Web Services Scanner Database Scanners:EFFECTIVENESS:SOAR Partial::METHOD:Dynamic Analysis with Manual Results Interpretation:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Host Application Interface Scanner Fuzz Tester Framework-based Fuzzer:EFFECTIVENESS:SOAR Partial::METHOD:Manual Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Focused Manual Spotcheck - Focused manual analysis of source Manual Source Code Review (not inspections):EFFECTIVENESS:SOAR Partial::METHOD:Automated Static Analysis - Source Code:DESCRIPTION:According to SOAR, the following detection techniques may be useful: Cost effective for partial coverage: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer:EFFECTIVENESS:SOAR Partial::METHOD:Architecture or Design Review:DESCRIPTION:According to SOAR, 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 Cost effective for partial coverage: Attack Modeling:EFFECTIVENESS:High::

Potential Mitigations: ::PHASE:Architecture and Design:DESCRIPTION:Divide the software into anonymous, normal, privileged, and administrative areas. Identify which of these areas require a proven user identity, and use a centralized authentication capability. Identify all potential communication channels, or other means of interaction with the software, to ensure that all channels are appropriately protected. Developers sometimes perform authentication at the primary channel, but open up a secondary channel that is assumed to be private. For example, a login mechanism may be listening on one network port, but after successful authentication, it may open up a second port where it waits for the connection, but avoids authentication because it assumes that only the authenticated party will connect to the port. In general, if the software or protocol allows a single session or user state to persist across multiple connections or channels, authentication and appropriate credential management need to be used throughout.::PHASE:Architecture and Design:DESCRIPTION:For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.::PHASE:Architecture and Design:DESCRIPTION:Where possible, avoid implementing custom authentication routines and consider using authentication capabilities as provided by the surrounding framework, operating system, or environment. These may make it easier to provide a clear separation between authentication tasks and authorization tasks. In environments such as the World Wide Web, the line between authentication and authorization is sometimes blurred. If custom authentication routines are required instead of those provided by the server, then these routines must be applied to every single page, since these pages could be requested directly.::PHASE:Architecture and Design:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using libraries with authentication capabilities such as OpenSSL or the ESAPI Authenticator [REF-45].::PHASE:Implementation System Configuration Operation:DESCRIPTION:When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to require strong authentication for users who should be allowed to access the data [REF-1297] [REF-1298] [REF-1302].::

Observed Examples: ::REFERENCE:CVE-2022-31260:DESCRIPTION:Chain: a digital asset management program has an undisclosed backdoor in the legacy version of a PHP script (CWE-912) that could allow an unauthenticated user to export metadata (CWE-306):LINK:https://www.cve.org/CVERecord?id=CVE-2022-31260::REFERENCE:CVE-2022-29951:DESCRIPTION:TCP-based protocol in Programmable Logic Controller (PLC) has no authentication.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-29951::REFERENCE:CVE-2022-29952:DESCRIPTION:Condition Monitor firmware uses a protocol that does not require authentication.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-29952::REFERENCE:CVE-2022-30276:DESCRIPTION:SCADA-based protocol for bridging WAN and LAN traffic has no authentication.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30276::REFERENCE:CVE-2022-30313:DESCRIPTION:Safety Instrumented System uses proprietary TCP protocols with no authentication.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30313::REFERENCE:CVE-2022-30317:DESCRIPTION:Distributed Control System (DCS) uses a protocol that has no authentication.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-30317::REFERENCE:CVE-2021-21972:DESCRIPTION:Chain: Cloud computing virtualization platform does not require authentication for upload of a tar format file (CWE-306), then uses .. path traversal sequences (CWE-23) in the file to access unexpected files, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-21972::REFERENCE:CVE-2020-10263:DESCRIPTION:Bluetooth speaker does not require authentication for the debug functionality on the UART port, allowing root shell access:LINK:https://www.cve.org/CVERecord?id=CVE-2020-10263::REFERENCE:CVE-2021-23147:DESCRIPTION:WiFi router does not require authentication for its UART port, allowing adversaries with physical access to execute commands as root:LINK:https://www.cve.org/CVERecord?id=CVE-2021-23147::REFERENCE:CVE-2021-37415:DESCRIPTION:IT management product does not perform authentication for some REST API requests, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2021-37415::REFERENCE:CVE-2020-13927:DESCRIPTION:Default setting in workflow management product allows all API requests without authentication, as exploited in the wild per CISA KEV.:LINK:https://www.cve.org/CVERecord?id=CVE-2020-13927::REFERENCE:CVE-2002-1810:DESCRIPTION:MFV. Access TFTP server without authentication and obtain configuration file with sensitive plaintext information.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1810::REFERENCE:CVE-2008-6827:DESCRIPTION:Agent software running at privileges does not authenticate incoming requests over an unprotected channel, allowing a Shatter attack.:LINK:https://www.cve.org/CVERecord?id=CVE-2008-6827::REFERENCE:CVE-2004-0213:DESCRIPTION:Product enforces restrictions through a GUI but not through privileged APIs.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0213::REFERENCE:CVE-2020-15483:DESCRIPTION:monitor device allows access to physical UART debug port without authentication:LINK:https://www.cve.org/CVERecord?id=CVE-2020-15483::REFERENCE:CVE-2019-9201:DESCRIPTION:Programmable Logic Controller (PLC) does not have an authentication feature on its communication protocols.:LINK:https://www.cve.org/CVERecord?id=CVE-2019-9201::