CWE-1313: Hardware Allows Activation of Test or Debug Logic at Runtime

BaseDraft

During runtime, the hardware allows for test or debug logic (feature) to be activated, which allows for changing the state of the hardware. This feature can alter the intended behavior of the system and allow for alteration and leakage of sensitive data by an adversary.

View on MITRE
Back to CWE Lookup

Extended Description

An adversary can take advantage of test or debug logic that is made accessible through the hardware during normal operation to modify the intended behavior of the system. For example, an accessible Test/debug mode may allow read/write access to any system data. Using error injection (a common test/debug feature) during a transmit/receive operation on a bus, data may be modified to produce an unintended message. Similarly, confidentiality could be compromised by such features allowing access to secrets.

Technical Details

Structure
Simple
Vulnerability Mapping
ALLOWED

Applicable To

Languages
Not Language-Specific
Platforms
Not OS-Specific

Source-backed guidance

Additional facts reviewed against primary or authoritative security sources.

Verify controls for CWE-1313 with SSDF evidence

Use NIST SSDF verification and vulnerability-response practices to detect CWE-1313, Hardware Allows Activation of Test or Debug Logic at Runtime, throughout the product lifecycle. Derive review questions, static or dynamic checks, and negative tests from the CWE's causal behavior; define the components and lifecycle stages each check covers; and retain findings with enough evidence to distinguish the root cause from symptoms and impacts. Track escapes and false negatives, then improve the verification plan after every confirmed occurrence.

NIST SP 800-218 Secure Software Development Framework — National Institute of Standards and Technology

Address Hardware Allows Activation of Test or Debug Logic at Runtime during Architecture and Design

MITRE associates mitigation with Architecture and Design, Implementation, and Integration; recorded impacts include Modify Memory, Read Memory, DoS: Crash, Exit, or Restart, DoS: Instability, and DoS: Resource Consumption (CPU); the entry maps to CAPEC-121. Use these source-defined anchors to turn CWE-1313 into implementation, review, and verification checks for the affected component.

CWE-1313: Hardware Allows Activation of Test or Debug Logic at Runtime — MITRE CWE

Triage CWE-1313 against known exploitation evidence

Use CISA's Known Exploited Vulnerabilities catalog to test whether a vulnerability mapped to CWE-1313, Hardware Allows Activation of Test or Debug Logic at Runtime, has evidence of exploitation in the wild. Confirm the CVE-to-CWE root-cause mapping independently before attaching the example, then capture the affected product, required action, and remediation deadline. A missing KEV match is not evidence that the weakness is unexploited, and a KEV entry must not be generalized to every occurrence of this CWE.

Known Exploited Vulnerabilities Catalog — Cybersecurity and Infrastructure Security Agency

Apply precise root-cause mapping to CWE-1313

Apply MITRE's full root-cause mapping guidance when using CWE-1313, Hardware Allows Activation of Test or Debug Logic at Runtime. Separate weakness language from attacker prerequisites and technical impact, check the entry's abstraction and vulnerability-mapping notes, and prefer the most specific Base or Variant supported by the evidence. Record the rejected alternatives and require an independent review before the mapping is used for remediation trends or program metrics.

CVE to CWE Root Cause Mapping Guidance — MITRE CWE

Validate CWE-1313 with root-cause mapping checks

Apply MITRE's root-cause mapping quick tips to CWE-1313, Hardware Allows Activation of Test or Debug Logic at Runtime. Confirm the finding describes the causal weakness rather than an impact or attack pattern, compare the abstraction and mapping notes with plausible alternatives, and have a second reviewer challenge the selection. Preserve the evidence and reasoning so recurring defects can be measured against one consistent identifier.

CVE to CWE Root Cause Mapping Quick Tips — MITRE CWE

Frequently Asked Questions

What is CWE-1313: Hardware Allows Activation of Test or Debug Logic at Runtime?+

CWE-1313: Hardware Allows Activation of Test or Debug Logic at Runtime is a Common Weakness Enumeration (CWE) entry maintained by MITRE. During runtime, the hardware allows for test or debug logic (feature) to be activated, which allows for changing the state of the hardware. This feature can alter the intended behavior of the system and allow for alteration and leakage of sensitive data by an adversary. An adversary can take advantage of test or debug logic that is made accessible through the hardware during normal operation to modify the intended behavior of the system. For example, an accessible Test/debug mode may allow read/write access to any system data. Using error injection (a common test/debug feature) during a transmit/receive operation on a bus, data may be modified to produce an unintended message. Similarly, confidentiality could be compromised by such features allowing access to secrets.

What are the security consequences of Hardware Allows Activation of Test or Debug Logic at Runtime?+

If exploited, CWE-1313 (Hardware Allows Activation of Test or Debug Logic at Runtime) it can compromise Confidentiality, Integrity and Availability, leading to outcomes such as Modify Memory, Read Memory, DoS: Crash, Exit, or Restart, DoS: Instability, DoS: Resource Consumption (CPU) and DoS: Resource Consumption (Memory).

How do you prevent or mitigate Hardware Allows Activation of Test or Debug Logic at Runtime?+

Recommended mitigations for CWE-1313 include: Insert restrictions on when the hardware's test or debug features can be activated. For example, during normal operating modes, the hardware's privileged modes that allow access to such features cannot be activated. Configuring the hardware to only enter a test or debug mode within a window of opportunity such as during boot or configuration stage. The result is disablement of such test/debug features and associated modes during normal runtime operations. Insert restrictions on when the hardware's test or debug features can be activated. For example, during normal operating modes, the hardware's privileged modes that allow access to such features cannot be activated. Configuring the hardware to only enter a test or debug mode within a window of opportunity such as during boot or configuration stage. The result is disablement of such test/debug features and associated modes during normal runtime operations. Insert restrictions on when the hardware's test or debug features can be activated. For example, during normal operating modes, the hardware's privileged modes that allow access to such features cannot be activated. Configuring the hardware to only enter a test or debug mode within a window of opportunity such as during boot or configuration stage. The result is disablement of such test/debug features and associated modes during normal runtime operations.

Which programming languages are affected by Hardware Allows Activation of Test or Debug Logic at Runtime?+

CWE-1313 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 Hardware Allows Activation of Test or Debug Logic at Runtime?+

MITRE documents real CVEs mapped to CWE-1313, including CVE-2021-33150 and CVE-2021-0146. 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-1313 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.

Learn More

Advertisement