Krutikp/ComplianceLLM huggingface dataset:
CWE-308: Use of Single-factor Authentication (Base)

Description: The use of single-factor authentication can lead to unnecessary risk of compromise when compared with the benefits of a dual-factor authentication scheme.

Extended Description: While the use of multiple authentication schemes is simply piling on more complexity on top of authentication, it is inestimably valuable to have such measures of redundancy. The use of weak, reused, and common passwords is rampant on the internet. Without the added protection of multiple authentication schemes, a single mistake can result in the compromise of an account. For this reason, if multiple schemes are possible and also easy to use, they should be implemented and required.



Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Architecture and Design:NOTE:COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.::



Common Consequences: ::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:NOTE:If the secret in a single-factor authentication scheme gets compromised, full authentication is possible.::


Potential Mitigations: ::PHASE:Architecture and Design:DESCRIPTION:Use multiple independent authentication schemes, which ensures that -- if one of the methods is compromised -- the system itself is still likely safe from compromise.::

Observed Examples: ::REFERENCE:CVE-2022-35248:DESCRIPTION:Chat application skips validation when Central Authentication Service (CAS) is enabled, effectively removing the second factor from two-factor authentication:LINK:https://www.cve.org/CVERecord?id=CVE-2022-35248::
CWE-309: Use of Password System for Primary Authentication (Base)

Description: The use of password systems as the primary means of authentication may be subject to several flaws or shortcomings, each reducing the effectiveness of the mechanism.


Background Details: ::Password systems are the simplest and most ubiquitous authentication mechanisms. However, they are subject to such well known attacks,and such frequent compromise that their use in the most simple implementation is not practical.::


Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Architecture and Design::



Common Consequences: ::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:A password authentication mechanism error will almost always result in attackers being authorized as valid users.::


Potential Mitigations: ::PHASE:Architecture and Design:DESCRIPTION:In order to protect password systems from compromise, the following should be noted: Passwords should be stored safely to prevent insider attack and to ensure that -- if a system is compromised -- the passwords are not retrievable. Due to password reuse, this information may be useful in the compromise of other systems these users work with. In order to protect these passwords, they should be stored encrypted, in a non-reversible state, such that the original text password cannot be extracted from the stored value. Password aging should be strictly enforced to ensure that passwords do not remain unchanged for long periods of time. The longer a password remains in use, the higher the probability that it has been compromised. For this reason, passwords should require refreshing periodically, and users should be informed of the risk of passwords which remain in use for too long. Password strength should be enforced intelligently. Rather than restrict passwords to specific content, or specific length, users should be encouraged to use upper and lower case letters, numbers, and symbols in their passwords. The system should also ensure that no passwords are derived from dictionary words.::PHASE:Architecture and Design:DESCRIPTION:Use a zero-knowledge password protocol, such as SRP.::PHASE:Architecture and Design:DESCRIPTION:Ensure that passwords are stored safely and are not reversible.::PHASE:Architecture and Design:DESCRIPTION:Implement password aging functionality that requires passwords be changed after a certain point.::PHASE:Architecture and Design:DESCRIPTION:Use a mechanism for determining the strength of a password and notify the user of weak password use.::PHASE:Architecture and Design:DESCRIPTION:Inform the user of why password protections are in place, how they work to protect data integrity, and why it is important to heed their warnings.::
CWE-322: Key Exchange without Entity Authentication (Base)

Description: The product performs a key exchange with an actor without verifying the identity of that actor.

Extended Description: Performing a key exchange will preserve the integrity of the information sent between two entities, but this will not guarantee that the entities are who they claim they are. This may enable an attacker to impersonate an actor by modifying traffic between the two entities. Typically, this involves a victim client that contacts a malicious server that is impersonating a trusted server. If the client skips authentication or ignores an authentication failure, the malicious server may request authentication information from the user. The malicious server can then use this authentication information to log in to the trusted server using the victim's credentials, sniff traffic between the victim and trusted server, etc.



Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

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:IMPACT:Bypass Protection Mechanism:NOTE:No authentication takes place in this process, bypassing an assumed protection of encryption.::SCOPE:Confidentiality:IMPACT:Read Application Data:NOTE:The encrypted communication between a user and a trusted host may be subject to sniffing by any actor in the communication path.::


Potential Mitigations: ::PHASE:Architecture and Design:DESCRIPTION:Ensure that proper authentication is included in the system design.::PHASE:Implementation:DESCRIPTION:Understand and properly implement all checks necessary to ensure the identity of entities involved in encrypted communications.::
CWE-323: Reusing a Nonce, Key Pair in Encryption (Base)

Description: Nonces should be used for the present occasion and only once.


Background Details: ::Nonces are often bundled with a key in a communication exchange to produce a new session key for each exchange.::


Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Architecture and Design:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::



Common Consequences: ::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:Potentially a replay attack, in which an attacker could send the same data twice, could be crafted if nonces are allowed to be reused. This could allow a user to send a message which masquerades as a valid message from a valid user.::


Potential Mitigations: ::PHASE:Implementation:DESCRIPTION:Refuse to reuse nonce values.::PHASE:Implementation:DESCRIPTION:Use techniques such as requiring incrementing, time based and/or challenge response to assure uniqueness of nonces.::
CWE-324: Use of a Key Past its Expiration Date (Base)

Description: The product uses a cryptographic key or password past its expiration date, which diminishes its safety significantly by increasing the timing window for cracking attacks against that key.

Extended Description: While the expiration of keys does not necessarily ensure that they are compromised, it is a significant concern that keys which remain in use for prolonged periods of time have a decreasing probability of integrity. For this reason, it is important to replace keys within a period of time proportional to their strength.



Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Architecture and Design:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::



Common Consequences: ::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism:IMPACT:Gain Privileges or Assume Identity:NOTE:The cryptographic key in question may be compromised, providing a malicious user with a method for authenticating as the victim.::


Potential Mitigations: ::PHASE:Architecture and Design:DESCRIPTION:Adequate consideration should be put in to the user interface in order to notify users previous to the key's expiration, to explain the importance of new key generation and to walk users through the process as painlessly as possible.::

Observed Examples: ::REFERENCE:CVE-2021-33020:DESCRIPTION:Picture Archiving and Communication System (PACS) system for hospitals uses a cryptographic key or password past its expiration date:LINK:https://www.cve.org/CVERecord?id=CVE-2021-33020::
CWE-325: Missing Cryptographic Step (Base)

Description: The product does not implement a required step in a cryptographic algorithm, resulting in weaker encryption than advertised by the algorithm.




Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Not Technology-Specific:TECHNOLOGY PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Implementation:NOTE:Developers sometimes omit expensive (resource-intensive) steps in order to improve performance, especially in devices with limited memory or slower CPUs. This step may be taken under a mistaken impression that the step is unnecessary for the cryptographic algorithm.::PHASE:Requirements:NOTE:This issue may happen when the requirements for the cryptographic algorithm are not clearly stated.::



Common Consequences: ::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::SCOPE:Confidentiality:SCOPE:Integrity:IMPACT:Read Application Data:IMPACT:Modify Application Data::SCOPE:Accountability:SCOPE:Non-Repudiation:IMPACT:Hide Activities::



Observed Examples: ::REFERENCE:CVE-2001-1585:DESCRIPTION:Missing challenge-response step allows authentication bypass using public key.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1585::

Functional Areas: ::Cryptography::


Notes: ::TYPE:Relationship:NOTE:Overlaps incomplete/missing security check.::TYPE:Relationship:NOTE:Can be resultant.::
CWE-331: Insufficient Entropy (Base)

Description: The product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others.




Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::



Common Consequences: ::SCOPE:Access Control:SCOPE:Other:IMPACT:Bypass Protection Mechanism:IMPACT:Other:NOTE:An attacker could guess the random numbers generated and could gain unauthorized access to a system if the random numbers are used for authentication and authorization.::


Potential Mitigations: ::PHASE:Implementation:DESCRIPTION:Determine the necessary entropy to adequately provide for randomness and predictability. This can be achieved by increasing the number of bits of objects such as keys and seeds.::

Observed Examples: ::REFERENCE:CVE-2001-0950:DESCRIPTION:Insufficiently random data used to generate session tokens using C rand(). Also, for certificate/key generation, uses a source that does not block when entropy is low.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-0950::REFERENCE:CVE-2008-2108:DESCRIPTION:Chain: insufficient precision (CWE-1339) in random-number generator causes some zero bits to be reliably generated, reducing the amount of entropy (CWE-331):LINK:https://www.cve.org/CVERecord?id=CVE-2008-2108::



Notes: ::TYPE:Maintenance:NOTE:As of CWE 4.5, terminology related to randomness, entropy, and predictability can vary widely. Within the developer and other communities, randomness is used heavily. However, within cryptography, entropy is distinct, typically implied as a measurement. There are no commonly-used definitions, even within standards documents and cryptography papers. Future versions of CWE will attempt to define these terms and, if necessary, distinguish between them in ways that are appropriate for different communities but do not reduce the usability of CWE for mapping, understanding, or other scenarios.::
CWE-334: Small Space of Random Values (Base)

Description: The number of possible random values is smaller than needed by the product, making it more susceptible to brute force attacks.




Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::



Common Consequences: ::SCOPE:Access Control:SCOPE:Other:IMPACT:Bypass Protection Mechanism:IMPACT:Other:NOTE:An attacker could easily guess the values used. This could lead to unauthorized access to a system if the seed is used for authentication and authorization.::


Potential Mitigations: ::PHASE:Architecture and Design Requirements:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C (Approved Random Number Generators).::

Observed Examples: ::REFERENCE:CVE-2002-0583:DESCRIPTION:Product uses 5 alphanumeric characters for filenames of expense claim reports, stored under web root.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0583::REFERENCE:CVE-2002-0903:DESCRIPTION:Product uses small number of random numbers for a code to approve an action, and also uses predictable new user IDs, allowing attackers to hijack new accounts.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0903::REFERENCE:CVE-2003-1230:DESCRIPTION:SYN cookies implementation only uses 32-bit keys, making it easier to brute force ISN.:LINK:https://www.cve.org/CVERecord?id=CVE-2003-1230::REFERENCE:CVE-2004-0230:DESCRIPTION:Complex predictability / randomness (reduced space).:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0230::



Notes: ::TYPE:Maintenance:NOTE:As of CWE 4.5, terminology related to randomness, entropy, and predictability can vary widely. Within the developer and other communities, randomness is used heavily. However, within cryptography, entropy is distinct, typically implied as a measurement. There are no commonly-used definitions, even within standards documents and cryptography papers. Future versions of CWE will attempt to define these terms and, if necessary, distinguish between them in ways that are appropriate for different communities but do not reduce the usability of CWE for mapping, understanding, or other scenarios.::
CWE-341: Predictable from Observable State (Base)

Description: A number or object is predictable based on observations that the attacker can make about the state of the system or network, such as time, process ID, etc.




Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Architecture and Design::PHASE:Implementation:NOTE:REALIZATION: This weakness is caused during implementation of an architectural security tactic.::



Common Consequences: ::SCOPE:Other:IMPACT:Varies by Context:NOTE:This weakness could be exploited by an attacker in a number ways depending on the context. If a predictable number is used to generate IDs or keys that are used within protection mechanisms, then an attacker could gain unauthorized access to the system. If predictable filenames are used for storing sensitive information, then an attacker might gain access to the system and may be able to gain access to the information in the file.::


Potential Mitigations: ::PHASE:Implementation:DESCRIPTION:Increase the entropy used to seed a PRNG.::PHASE:Architecture and Design Requirements:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C (Approved Random Number Generators).::PHASE:Implementation:DESCRIPTION:Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.::

Observed Examples: ::REFERENCE:CVE-2002-0389:DESCRIPTION:Mail server stores private mail messages with predictable filenames in a world-executable directory, which allows local users to read private mailing list archives.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0389::REFERENCE:CVE-2001-1141:DESCRIPTION:PRNG allows attackers to use the output of small PRNG requests to determine the internal state information, which could be used by attackers to predict future pseudo-random numbers.:LINK:https://www.cve.org/CVERecord?id=CVE-2001-1141::REFERENCE:CVE-2000-0335:DESCRIPTION:DNS resolver library uses predictable IDs, which allows a local attacker to spoof DNS query results.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0335::REFERENCE:CVE-2005-1636:DESCRIPTION:MFV. predictable filename and insecure permissions allows file modification to execute SQL queries.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1636::



Notes: ::TYPE:Maintenance:NOTE:As of CWE 4.5, terminology related to randomness, entropy, and predictability can vary widely. Within the developer and other communities, randomness is used heavily. However, within cryptography, entropy is distinct, typically implied as a measurement. There are no commonly-used definitions, even within standards documents and cryptography papers. Future versions of CWE will attempt to define these terms and, if necessary, distinguish between them in ways that are appropriate for different communities but do not reduce the usability of CWE for mapping, understanding, or other scenarios.::
CWE-342: Predictable Exact Value from Previous Values (Base)

Description: An exact value or random number can be precisely predicted by observing previous values.




Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Architecture and Design::PHASE:Implementation::



Common Consequences: ::SCOPE:Other:IMPACT:Varies by Context::


Potential Mitigations: ::PHASE::DESCRIPTION:Increase the entropy used to seed a PRNG.::PHASE:Architecture and Design Requirements:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C (Approved Random Number Generators).::PHASE:Implementation:DESCRIPTION:Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.::

Observed Examples: ::REFERENCE:CVE-2002-1463:DESCRIPTION:Firewall generates easily predictable initial sequence numbers (ISN), which allows remote attackers to spoof connections.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1463::REFERENCE:CVE-1999-0074:DESCRIPTION:Listening TCP ports are sequentially allocated, allowing spoofing attacks.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-0074::REFERENCE:CVE-1999-0077:DESCRIPTION:Predictable TCP sequence numbers allow spoofing.:LINK:https://www.cve.org/CVERecord?id=CVE-1999-0077::REFERENCE:CVE-2000-0335:DESCRIPTION:DNS resolver uses predictable IDs, allowing a local user to spoof DNS query results.:LINK:https://www.cve.org/CVERecord?id=CVE-2000-0335::



Notes: ::TYPE:Maintenance:NOTE:As of CWE 4.5, terminology related to randomness, entropy, and predictability can vary widely. Within the developer and other communities, randomness is used heavily. However, within cryptography, entropy is distinct, typically implied as a measurement. There are no commonly-used definitions, even within standards documents and cryptography papers. Future versions of CWE will attempt to define these terms and, if necessary, distinguish between them in ways that are appropriate for different communities but do not reduce the usability of CWE for mapping, understanding, or other scenarios.::
CWE-343: Predictable Value Range from Previous Values (Base)

Description: The product's random number generator produces a series of values which, when observed, can be used to infer a relatively small range of possibilities for the next value that could be generated.

Extended Description: The output of a random number generator should not be predictable based on observations of previous values. In some cases, an attacker cannot predict the exact value that will be produced next, but can narrow down the possibilities significantly. This reduces the amount of effort to perform a brute force attack. For example, suppose the product generates random numbers between 1 and 100, but it always produces a larger value until it reaches 100. If the generator produces an 80, then the attacker knows that the next value will be somewhere between 81 and 100. Instead of 100 possibilities, the attacker only needs to consider 20.



Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Architecture and Design::PHASE:Implementation::



Common Consequences: ::SCOPE:Other:IMPACT:Varies by Context::


Potential Mitigations: ::PHASE::DESCRIPTION:Increase the entropy used to seed a PRNG.::PHASE:Architecture and Design Requirements:STRATEGY:Libraries or Frameworks:DESCRIPTION:Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C (Approved Random Number Generators).::PHASE:Implementation:DESCRIPTION:Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.::




Notes: ::TYPE:Maintenance:NOTE:As of CWE 4.5, terminology related to randomness, entropy, and predictability can vary widely. Within the developer and other communities, randomness is used heavily. However, within cryptography, entropy is distinct, typically implied as a measurement. There are no commonly-used definitions, even within standards documents and cryptography papers. Future versions of CWE will attempt to define these terms and, if necessary, distinguish between them in ways that are appropriate for different communities but do not reduce the usability of CWE for mapping, understanding, or other scenarios.::
CWE-344: Use of Invariant Value in Dynamically Changing Context (Base)

Description: The product uses a constant value, name, or reference, but this value can (or should) vary across different environments.




Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Architecture and Design::PHASE:Implementation::



Common Consequences: ::SCOPE:Other:IMPACT:Varies by Context::



Observed Examples: ::REFERENCE:CVE-2002-0980:DESCRIPTION:Component for web browser writes an error message to a known location, which can then be referenced by attackers to process HTML/script in a less restrictive context:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0980::



Notes: ::TYPE:Relationship:NOTE:overlaps default configuration.::