Cryptographic algorithms are the methods by which data is scrambled to prevent observation or influence by unauthorized actors. Insecure cryptography can be exploited to expose sensitive information, modify data in unexpected ways, spoof identities of other users or devices, or other impacts.
It is very difficult to produce a secure algorithm, and even high-profile algorithms by accomplished cryptographic experts have been broken. Well-known techniques exist to break or weaken various kinds of cryptography. Accordingly, there are a small number of well-understood and heavily studied algorithms that should be used by most products. Using a non-standard or known-insecure algorithm is dangerous because a determined adversary may be able to break the algorithm and compromise whatever data has been protected.
Since the state of cryptography advances so rapidly, it is common for an algorithm to be considered "unsafe" even if it was once thought to be strong. This can happen when new attacks are discovered, or if computing power increases so much that the cryptographic algorithm no longer provides the amount of protection that was originally thought.
For a number of reasons, this weakness is even more challenging to manage with hardware deployment of cryptographic algorithms as opposed to software implementation. First, if a flaw is discovered with hardware-implemented cryptography, the flaw cannot be fixed in most cases without a recall of the product, because hardware is not easily replaceable like software. Second, because the hardware product is expected to work for years, the adversary's computing power will only increase over time.
| Impact | Details |
|---|---|
|
Read Application Data |
Scope: Confidentiality
The confidentiality of sensitive data may be compromised by the use of a broken or risky cryptographic algorithm.
|
|
Modify Application Data |
Scope: Integrity
The integrity of sensitive data may be compromised by the use of a broken or risky cryptographic algorithm.
|
|
Hide Activities |
Scope: Accountability, Non-Repudiation
If the cryptographic algorithm is used to ensure the identity of the source of the data (such as digital signatures), then a broken algorithm will compromise this scheme and the source of the data cannot be proven.
|
| Phase(s) | Mitigation |
|---|---|
|
Architecture and Design |
Strategy: Libraries or Frameworks When there is a need to store or transmit sensitive data, use strong, up-to-date cryptographic algorithms to encrypt that data. Select a well-vetted algorithm that is currently considered to be strong by experts in the field, and use well-tested implementations. As with all cryptographic mechanisms, the source code should be available for analysis. For example, US government systems require FIPS 140-2 certification [REF-1192]. Do not develop custom or private cryptographic algorithms. They will likely be exposed to attacks that are well-understood by cryptographers. Reverse engineering techniques are mature. If the algorithm can be compromised if attackers find out how it works, then it is especially weak. Periodically ensure that the cryptography has not become obsolete. Some older algorithms, once thought to require a billion years of computing time, can now be broken in days or hours. This includes MD4, MD5, SHA1, DES, and other algorithms that were once regarded as strong. [REF-267] |
|
Architecture and Design |
Ensure that the design allows one cryptographic algorithm to be replaced with another in the next generation or version. Where possible, use wrappers to make the interfaces uniform. This will make it easier to upgrade to stronger algorithms. With hardware, design the product at the Intellectual Property (IP) level so that one cryptographic algorithm can be replaced with another in the next generation of the hardware product.
Effectiveness: Defense in Depth |
|
Architecture and Design |
Carefully manage and protect cryptographic keys (see CWE-320). If the keys can be guessed or stolen, then the strength of the cryptography itself is irrelevant.
|
|
Architecture and Design |
Strategy: Libraries or Frameworks Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Industry-standard implementations will save development time and may be more likely to avoid errors that can occur during implementation of cryptographic algorithms. Consider the ESAPI Encryption feature. |
|
Implementation; Architecture and Design |
When using industry-approved techniques, use them correctly. Don't cut corners by skipping resource-intensive steps (CWE-325). These steps are often essential for preventing common attacks.
|
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Pillar Pillar - a weakness that is the most abstract type of weakness and represents a theme for all class/base/variant weaknesses related to it. A Pillar is different from a Category as a Pillar is still technically a type of weakness that describes a mistake, while a Category represents a common characteristic used to group related things. | 693 | Protection Mechanism Failure |
| ParentOf | Base Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource. | 328 | Use of Weak Hash |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 780 | Use of RSA Algorithm without OAEP |
| ParentOf | Base Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource. | 1240 | Use of a Cryptographic Primitive with a Risky Implementation |
| PeerOf | Base Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource. | 301 | Reflection Attack in an Authentication Protocol |
| PeerOf | Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. | 311 | Missing Encryption of Sensitive Data |
| CanFollow | Base Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource. | 208 | Observable Timing Discrepancy |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | View View - a subset of CWE entries that provides a way of examining CWE content. The two main view structures are Slices (flat lists) and Graphs (containing relationships between entries). | 1003 | Weaknesses for Simplified Mapping of Published Vulnerabilities |
| ParentOf | Base Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource. | 916 | Use of Password Hash With Insufficient Computational Effort |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | Category Category - a CWE entry that contains a set of other entries that share a common characteristic. | 1013 | Encrypt Data |
| Phase | Note |
|---|---|
| Architecture and Design | COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic. |
| Implementation | With hardware, the Architecture or Design Phase might start with compliant cryptography, but it is replaced with a non-compliant crypto during the later Implementation phase due to implementation constraints (e.g., not enough entropy to make it function properly, or not enough silicon real estate available to implement). Or, in rare cases (especially for long projects that span over years), the Architecture specifications might start with cryptography that was originally compliant at the time the Architectural specs were written, but over the time it became non-compliant due to progress made in attacking the crypto. |
Class: Not Language-Specific (Undetermined Prevalence)
Verilog (Undetermined Prevalence)
VHDL (Undetermined Prevalence)
Class: Not Technology-Specific (Undetermined Prevalence)
Class: ICS/OT (Undetermined Prevalence)
Example 1
These code examples use the Data Encryption Standard (DES).
Once considered a strong algorithm, DES now regarded as insufficient for many applications. It has been replaced by Advanced Encryption Standard (AES).
Example 2
Suppose a chip manufacturer decides to implement a hashing scheme for verifying integrity property of certain bitstream, and it chooses to implement a SHA1 hardware accelerator for to implement the scheme.
However, SHA1 was theoretically broken in 2005 and practically broken in 2017 at a cost of 110ドルK. This means an attacker with access to cloud-rented computing power will now be able to provide a malicious bitstream with the same hash value, thereby defeating the purpose for which the hash was used.
This issue could have been avoided with better design.
Example 3
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 OT products used weak cryptography.
Note: this is a curated list of examples for users to understand the variety of ways in which this weakness can be introduced. It is not a complete list of all CVEs that are related to this CWE entry.
| Reference | Description |
|---|---|
|
SCADA-based protocol supports a legacy encryption mode that uses Tiny Encryption Algorithm (TEA) in ECB mode, which leaks patterns in messages and cannot protect integrity
|
|
|
Programmable Logic Controller (PLC) uses a protocol with a cryptographically insecure hashing algorithm for passwords.
|
|
|
Product uses "ROT-25" to obfuscate the password in the registry.
|
|
|
product only uses "XOR" to obfuscate sensitive data
|
|
|
product only uses "XOR" and a fixed key to obfuscate sensitive data
|
|
|
Product substitutes characters with other characters in a fixed way, and also leaves certain input characters unchanged.
|
|
|
Attackers can infer private IP addresses by dividing each octet by the MD5 hash of '20'.
|
|
|
Product uses DES when MD5 has been specified in the configuration, resulting in weaker-than-expected password hashes.
|
|
|
Default configuration of product uses MD5 instead of stronger algorithms that are available, simplifying forgery of certificates.
|
|
|
Product uses the hash of a hash for authentication, allowing attackers to gain privileges if they can obtain the original hash.
|
| Method | Details |
|---|---|
|
Automated Analysis |
Automated methods may be useful for recognizing commonly-used libraries or features that have become obsolete.
Effectiveness: Moderate Note:False negatives may occur if the tool is not aware of the cryptographic libraries in use, or if custom cryptography is being used. |
|
Manual Analysis |
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.
Note:These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules.
|
|
Automated Static Analysis - Binary or Bytecode |
According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage:
Effectiveness: SOAR Partial |
|
Manual Static Analysis - Binary or Bytecode |
According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage:
Effectiveness: SOAR Partial |
|
Dynamic Analysis with Automated Results Interpretation |
According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage:
Effectiveness: SOAR Partial |
|
Dynamic Analysis with Manual Results Interpretation |
According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective:
Cost effective for partial coverage:
Effectiveness: High |
|
Manual Static Analysis - Source Code |
According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective:
Cost effective for partial coverage:
Effectiveness: High |
|
Automated Static Analysis - Source Code |
According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective:
Effectiveness: High |
|
Automated Static Analysis |
According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage:
Effectiveness: SOAR Partial |
|
Architecture or Design Review |
According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective:
Cost effective for partial coverage:
Effectiveness: High |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 729 | OWASP Top Ten 2004 Category A8 - Insecure Storage |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 753 | 2009 Top 25 - Porous Defenses |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 803 | 2010 Top 25 - Porous Defenses |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 816 | OWASP Top Ten 2010 Category A7 - Insecure Cryptographic Storage |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 866 | 2011 Top 25 - Porous Defenses |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 883 | CERT C++ Secure Coding Section 49 - Miscellaneous (MSC) |
| MemberOf | ViewView - a subset of CWE entries that provides a way of examining CWE content. The two main view structures are Slices (flat lists) and Graphs (containing relationships between entries). | 884 | CWE Cross-section |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 934 | OWASP Top Ten 2013 Category A6 - Sensitive Data Exposure |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 958 | SFP Secondary Cluster: Broken Cryptography |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1029 | OWASP Top Ten 2017 Category A3 - Sensitive Data Exposure |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1131 | CISQ Quality Measures (2016) - Security |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1152 | SEI CERT Oracle Secure Coding Standard for Java - Guidelines 49. Miscellaneous (MSC) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1170 | SEI CERT C Coding Standard - Guidelines 48. Miscellaneous (MSC) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1346 | OWASP Top Ten 2021 Category A02:2021 - Cryptographic Failures |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1366 | ICS Communications: Frail Security in Protocols |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1402 | Comprehensive Categorization: Encryption |
Rationale
This CWE entry is a Class and might have Base-level children that would be more appropriateComments
Examine children of this entry to see if there is a better fitMaintenance
Maintenance
| Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
|---|---|---|---|
| CLASP | Using a broken or risky cryptographic algorithm | ||
| OWASP Top Ten 2004 | A8 | CWE More Specific | Insecure Storage |
| CERT C Secure Coding | MSC30-C | CWE More Abstract | Do not use the rand() function for generating pseudorandom numbers |
| CERT C Secure Coding | MSC32-C | CWE More Abstract | Properly seed pseudorandom number generators |
| The CERT Oracle Secure Coding Standard for Java (2011) | MSC02-J | Generate strong random numbers | |
| OMG ASCSM | ASCSM-CWE-327 | ||
| ISA/IEC 62443 | Part 3-3 | Req SR 4.3 | |
| ISA/IEC 62443 | Part 4-2 | Req CR 4.3 |
| CAPEC-ID | Attack Pattern Name |
|---|---|
| CAPEC-20 | Encryption Brute Forcing |
| CAPEC-459 | Creating a Rogue Certification Authority Certificate |
| CAPEC-473 | Signature Spoof |
| CAPEC-475 | Signature Spoofing by Improper Validation |
| CAPEC-608 | Cryptanalysis of Cellular Encryption |
| CAPEC-614 | Rooting SIM Cards |
| CAPEC-97 | Cryptanalysis |
| Submissions | |||
|---|---|---|---|
| Submission Date | Submitter | Organization | |
|
2006年07月19日
(CWE Draft 3, 2006年07月19日) |
CLASP | ||
| Contributions | |||
| Contribution Date | Contributor | Organization | |
| 2019年12月10日 | Parbati K. Manna | Intel Corporation | |
| Provide a hardware-specific submission whose contents were integrated into this entry, affecting extended description, applicable platforms, demonstrative examples, and mitigations | |||
| Modifications | |||
| Modification Date | Modifier | Organization | |
|
2025年09月09日
(CWE 4.18, 2025年09月09日) |
CWE Content Team | MITRE | |
| updated Detection_Factors, Potential_Mitigations, References | |||
| 2023年06月29日 | CWE Content Team | MITRE | |
| updated Mapping_Notes, Relationships | |||
| 2023年04月27日 | CWE Content Team | MITRE | |
| updated References, Relationships | |||
| 2023年01月31日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms, Background_Details, Demonstrative_Examples, Description, Maintenance_Notes, Modes_of_Introduction, Observed_Examples, Potential_Mitigations, References, Taxonomy_Mappings, Time_of_Introduction | |||
| 2022年10月13日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples, Observed_Examples, References | |||
| 2022年04月28日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2021年10月28日 | CWE Content Team | MITRE | |
| updated Maintenance_Notes, Potential_Mitigations, Relationships | |||
| 2021年03月15日 | CWE Content Team | MITRE | |
| updated References | |||
| 2020年02月24日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms, Detection_Factors, Maintenance_Notes, Relationships | |||
| 2019年06月20日 | CWE Content Team | MITRE | |
| updated Related_Attack_Patterns, Relationships, Type | |||
| 2019年01月03日 | CWE Content Team | MITRE | |
| updated References, Relationships, Taxonomy_Mappings | |||
| 2018年03月27日 | CWE Content Team | MITRE | |
| updated References, Relationships | |||
| 2017年11月08日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples, Likelihood_of_Exploit, Modes_of_Introduction, References, Relationships, Taxonomy_Mappings | |||
| 2017年01月19日 | CWE Content Team | MITRE | |
| updated Related_Attack_Patterns | |||
| 2015年12月07日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2014年07月30日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples, Detection_Factors, Relationships | |||
| 2014年06月23日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2014年02月18日 | CWE Content Team | MITRE | |
| updated Related_Attack_Patterns | |||
| 2013年02月21日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2012年10月30日 | CWE Content Team | MITRE | |
| updated Potential_Mitigations | |||
| 2012年05月11日 | CWE Content Team | MITRE | |
| updated References, Related_Attack_Patterns, Relationships, Taxonomy_Mappings | |||
| 2011年09月13日 | CWE Content Team | MITRE | |
| updated Potential_Mitigations, Relationships, Taxonomy_Mappings | |||
| 2011年06月27日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2011年06月01日 | CWE Content Team | MITRE | |
| updated Relationships, Taxonomy_Mappings | |||
| 2011年03月29日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples, Description | |||
| 2010年09月27日 | CWE Content Team | MITRE | |
| updated Potential_Mitigations, Relationships | |||
| 2010年06月21日 | CWE Content Team | MITRE | |
| updated Common_Consequences, Detection_Factors, Potential_Mitigations, References, Relationships | |||
| 2010年04月05日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms, Potential_Mitigations, Related_Attack_Patterns | |||
| 2010年02月16日 | CWE Content Team | MITRE | |
| updated Detection_Factors, References, Relationships | |||
| 2009年12月28日 | CWE Content Team | MITRE | |
| updated References | |||
| 2009年10月29日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2009年07月27日 | CWE Content Team | MITRE | |
| updated Maintenance_Notes, Relationships | |||
| 2009年03月10日 | CWE Content Team | MITRE | |
| updated Potential_Mitigations | |||
| 2009年01月12日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples, Description, Observed_Examples, Potential_Mitigations, References, Relationships | |||
| 2008年09月08日 | CWE Content Team | MITRE | |
| updated Background_Details, Common_Consequences, Description, Relationships, Taxonomy_Mappings | |||
| 2008年08月15日 | Veracode | ||
| Suggested OWASP Top Ten 2004 mapping | |||
| Previous Entry Names | |||
| Change Date | Previous Entry Name | ||
| 2008年04月11日 | Using a Broken or Risky Cryptographic Algorithm | ||
Use of the Common Weakness Enumeration (CWE™) and the associated references from this website are subject to the Terms of Use. CWE is sponsored by the U.S. Department of Homeland Security (DHS) Cybersecurity and Infrastructure Security Agency (CISA) and managed by the Homeland Security Systems Engineering and Development Institute (HSSEDI) which is operated by The MITRE Corporation (MITRE). Copyright © 2006–2025, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation.