What is CWE-306: Missing Authentication for Critical Function?+
CWE-306: Missing Authentication for Critical Function is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.
Is CWE-306 in the CWE Top 25 Most Dangerous Software Weaknesses?+
Yes. CWE-306 ranked #21 in the CWE Top 25 for 2024, associated with 744 CVEs that year. The CWE Top 25 highlights the most common and impactful software weaknesses based on real-world vulnerability data.
What are the security consequences of Missing Authentication for Critical Function?+
If exploited, CWE-306 (Missing Authentication for Critical Function) it can compromise Access Control and Other, leading to outcomes such as Gain Privileges or Assume Identity and Varies by Context.
How do you prevent or mitigate Missing Authentication for Critical Function?+
Recommended mitigations for CWE-306 include: 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, including those channels that are assumed to be accessible only by authorized parties. 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. Where possible, avoid implementing custom, "grow-your-own" authentication routines and consider using authentication capabilities as provided by the surrounding framework, operating system, or environment. These capabilities may avoid common weaknesses that are unique to authentication; support automatic auditing and tracking; and 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. 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].
How is Missing Authentication for Critical Function detected?+
CWE-306 can be detected using Manual Static Analysis - Binary or Bytecode, Dynamic Analysis with Automated Results Interpretation, Dynamic Analysis with Manual Results Interpretation, Manual Static Analysis - Source Code, Automated Static Analysis - Source Code and Architecture or Design Review. Combining automated tooling with manual review typically yields the best coverage.
Which programming languages are affected by Missing Authentication for Critical Function?+
CWE-306 commonly affects Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.
What are real-world examples of Missing Authentication for Critical Function?+
MITRE documents real CVEs mapped to CWE-306, including CVE-2024-11680, CVE-2022-31260, CVE-2022-29951, CVE-2022-29952 and CVE-2022-30276. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.
What is the difference between a CWE and a CVE?+
A CWE (Common Weakness Enumeration) like CWE-306 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.