---
title: "CWE-489: Active Debug Code"
url: https://radicalnotion.ai/cwe/cwe-489
type: cwe
description: "The product is released with debugging code still enabled or active."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-489: Active Debug Code

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Draft
- **CVEs with this as primary weakness:** 99
- **Of those, in CISA KEV:** 0
- **New in 2026:** 30
- **CWE catalog version:** 4.21

## Description

The product is released with debugging code still enabled or active.

## Alternate terms

- **Leftover debug code:** This term originates from Seven Pernicious Kingdoms

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | In web-based applications, debug code is used to test and modify web application properties, configuration information, and functions. If a debug application is left on a production server, this oversight during the "software process" allows attackers access to debug functionality. |
| Implementation | A common development practice is to add "back door" code specifically designed for debugging or testing purposes that is not intended to be shipped or deployed with the product. These back door entry points create security risks because they are not considered during design or testing and fall outside of the expected operating conditions of the product. |
| Build and Compilation | - |
| Operation | - |

## Applicable platforms

**Languages:** Python (Undetermined)

**Technologies:** ICS/OT (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity, Availability, Access Control, Other | Bypass Protection Mechanism, Read Application Data, Gain Privileges or Assume Identity, Varies by Context | Active debug code can create unintended entry points or expose sensitive information. The severity of the exposed debug code will depend on the particular instance. At the least, it will give an attacker sensitive information about the settings and mechanics of web applications on the server. At worst, as is often the case, the debug code will allow an attacker complete control over the web application and server, as well as confidential information that is accessed by either of these. |

## Potential mitigations

### Build and Compilation, Distribution

Remove debug code before deploying the application.

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Effectiveness: High

## Demonstrative examples

### Example 1

Debug code can be used to bypass authentication. For example, suppose an application has a login script that receives a username and a password. Assume also that a third, optional, parameter, called "debug", is interpreted by the script as requesting a switch to debug mode, and that when this parameter is given the username and password are not checked. In such a case, it is very simple to bypass the authentication process if the special behavior of the application regarding the debug parameter is known. In a case where the form is:

Bad code:

```html
<FORM ACTION="/authenticate_login.cgi">
    <INPUT TYPE=TEXT name=username>
    <INPUT TYPE=PASSWORD name=password>
    <INPUT TYPE=SUBMIT>
</FORM>
```

Informative code:

```
http://TARGET/authenticate_login.cgi?username=...&password=...
```

Attack code:

```
http://TARGET/authenticate_login.cgi?username=&password=&debug=1
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2024-44092 | smartphone is built for production with debugging code present, allowing local privilege escalation |
| CVE-2024-36475 | network hub contains active debug code, which allows users to execute arbitrary OS commands using a debug function |
| CVE-2024-29075 | Mesh Wi-Fi router has active debug code, allowing attackers to modify device settings |

## Real CVEs with this weakness (sample of 12 of 99)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2023-4804 | Quantum HD Unity | critical | 10.0 | - | No | 2023-11-10 |
| CVE-2025-46674 | - | critical | 9.9 | - | No | 2025-04-27 |
| CVE-2026-120637 | CGI versions before 5.00 for Perl take request parameters from the process command line arguments for an unrecognised REQUEST\_METHOD | critical | 9.8 | - | No | 2026-11-03 |
| CVE-2024-9644 | Four-Faith F3x36 bapply.cgi Auth Bypass | critical | 9.8 | - | No | 2025-02-04 |
| CVE-2024-9643 | Four-Faith F3x36 Hidden Debug Credentials | critical | 9.8 | - | No | 2025-02-04 |
| CVE-2024-46873 | - | critical | 9.8 | - | No | 2024-12-23 |
| CVE-2024-21785 | AutomationDirect P3-550E Telnet Diagnostic Interface leftover debug code vulnerability | critical | 9.8 | - | No | 2024-05-28 |
| CVE-2024-32047 | CyberPower PowerPanel business Active Debug Code | critical | 9.8 | - | No | 2024-05-15 |
| CVE-2024-28008 | Active Debug Code in Aterm CR2500P and other products | critical | 9.8 | - | No | 2024-03-28 |
| CVE-2023-32645 | Yifan YF325 httpd debug credentials leftover debug code vulnerability | critical | 9.8 | - | No | 2023-10-11 |
| CVE-2023-34346 | Yifan YF325 httpd gwcfg.cgi get stack-based buffer overflow vulnerability | critical | 9.8 | - | No | 2023-10-11 |
| CVE-2023-0954 | Debug feature in Sensormatic Electronics Illustra Dome and PTZ cameras | critical | 9.8 | - | No | 2023-06-08 |

## Related attack patterns (CAPEC)

- [CAPEC-121](https://radicalnotion.ai/capec/capec-121): Exploit Non-Production Interfaces
- [CAPEC-661](https://radicalnotion.ai/capec/capec-661): Root/Jailbreak Detection Evasion via Debugging

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-710](https://radicalnotion.ai/cwe/cwe-710) | Improper Adherence to Coding Standards |
| Child | [CWE-11](https://radicalnotion.ai/cwe/cwe-11) | ASP.NET Misconfiguration: Creating Debug Binary |
| Can precede | [CWE-215](https://radicalnotion.ai/cwe/cwe-215) | Insertion of Sensitive Information Into Debugging Code |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | Leftover Debug Code | - | - |
| OWASP Top Ten 2004 | Insecure Configuration Management | A10 | CWE More Specific |
| Software Fault Patterns | Unexpected access points | SFP28 | - |
| OpenSSF Secure Coding Guide for Python | Exclude Developer Tools From the Final Product | pyscg-0021 | - |

## Frequently asked questions

### What is CWE-489?

The product is released with debugging code still enabled or active.

### What CVEs are caused by CWE-489?

99 recorded CVEs are attributed to CWE-489, including CVE-2023-4804, CVE-2025-46674 and CVE-2026-120637.

### Is CWE-489 part of the OWASP Top 10?

CWE-489 maps to OWASP Top Ten 2004: Insecure Configuration Management (A10) in the OWASP security taxonomy.

### How do you prevent CWE-489?

Remove debug code before deploying the application.

### How is CWE-489 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

### What are the consequences of CWE-489?

Exploiting CWE-489 can lead to: Bypass Protection Mechanism, Read Application Data, Gain Privileges or Assume Identity, Varies by Context.

### Is CWE-489 actively exploited?

99 recorded CVEs are caused by CWE-489; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/489.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-489). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
