---
title: "CWE-626: Null Byte Interaction Error (Poison Null Byte)"
url: https://radicalnotion.ai/cwe/cwe-626
type: cwe
description: "The product does not properly handle null bytes or NUL characters when passing data between different representations or components."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-626: Null Byte Interaction Error (Poison Null Byte)

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

## Description

The product does not properly handle null bytes or NUL characters when passing data between different representations or components.

A null byte (NUL character) can have different meanings across representations or languages. For example, it is a string terminator in standard C libraries, but Perl and PHP strings do not treat it as a terminator. When two representations are crossed - such as when Perl or PHP invokes underlying C functionality - this can produce an interaction error with unexpected results. Similar issues have been reported for ASP. Other interpreters written in C might also be affected.

The poison null byte is frequently useful in path traversal attacks by terminating hard-coded extensions that are added to a filename. It can play a role in regular expression processing in PHP.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Applicable platforms

**Languages:** PHP (Undetermined), Perl (Undetermined), ASP.NET (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity | Unexpected State | - |

## Potential mitigations

### Implementation

Remove null bytes from all incoming strings.

## 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.)

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2005-4155 | NUL byte bypasses PHP regular expression check |
| CVE-2005-3153 | inserting SQL after a NUL byte bypasses allowlist regexp, enabling SQL injection |

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2019-11936 | - | critical | 9.8 | - | No | 2019-12-04 |
| CVE-2019-17137 | NETGEAR AC1200 mini\_httpd Poison Null Byte Authentication Bypass Vulnerability | critical | 9.4 | - | No | 2020-02-10 |
| CVE-2026-133310 | Wing FTP Server before 8.2.8 Remote Code Execution via NUL Byte | critical | 9.2 | - | No | 2026-11-19 |
| CVE-2026-116130 | HTTP::Parser::XS versions before 0.18 for Perl truncate PATH\_INFO at an encoded NUL byte in parse\_http\_request | critical | 9.1 | - | No | 2026-10-30 |
| CVE-2021-23960 | Mozilla: Use-after-poison for incorrectly redeclared JavaScript variables during GC | high | 8.8 | - | No | 2021-02-26 |
| CVE-2019-19959 | sqlite: mishandles certain uses of INSERT INTO in situations involving embedded '\\0' characters in filenames | high | 7.5 | - | No | 2020-01-03 |
| CVE-2026-62380 | Netty before 4.2.16.Final SOCKS Proxy Null Byte Injection | medium | 6.3 | - | No | 2026-08-22 |
| CVE-2020-10773 | kernel: kernel stack information leak on s390/s390x | medium | 4.4 | - | No | 2020-09-10 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-147](https://radicalnotion.ai/cwe/cwe-147) | Improper Neutralization of Input Terminators |
| Parent | [CWE-436](https://radicalnotion.ai/cwe/cwe-436) | Interpretation Conflict |

## Frequently asked questions

### What is CWE-626?

The product does not properly handle null bytes or NUL characters when passing data between different representations or components.

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

8 recorded CVEs are attributed to CWE-626, including CVE-2019-11936, CVE-2019-17137 and CVE-2026-133310.

### How do you prevent CWE-626?

Remove null bytes from all incoming strings.

### How is CWE-626 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-626?

Exploiting CWE-626 can lead to: Unexpected State.

### Is CWE-626 actively exploited?

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

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

---

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