---
title: "CWE-1286: Improper Validation of Syntactic Correctness of Input"
url: https://radicalnotion.ai/cwe/cwe-1286
type: cwe
description: "The product receives input that is expected to be well-formed - i.e., to comply with a certain syntax - but it does not validate or incorrectly validates that the input complies with the syntax."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-1286: Improper Validation of Syntactic Correctness of Input

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

## Description

The product receives input that is expected to be well-formed - i.e., to comply with a certain syntax - but it does not validate or incorrectly validates that the input complies with the syntax.

## Background

Often, complex inputs are expected to follow a particular syntax, which is either assumed by the input itself, or declared within metadata such as headers. The syntax could be for data exchange formats, markup languages, or even programming languages.

## Modes of introduction

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

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Other | Varies by Context | When untrusted input is not properly validated for the expected syntax, attackers could cause parsing failures, trigger unexpected errors, or expose latent vulnerabilities that might not be directly exploitable if the input had conformed to the syntax. |

## Potential mitigations

### Implementation (Input Validation)

Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

Effectiveness: High

## Demonstrative examples

### Example 1

The following code loads and parses an XML file.

Bad code:

```java
// Read DOM
try {
    ...
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating( false );
    ....
    c_dom = factory.newDocumentBuilder().parse( xmlFile );
} catch(Exception ex) {
    ...
}
```

The XML file is loaded without validating it against a known XML Schema or DTD.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2016-4029 | Chain: incorrect validation of intended decimal-based IP address format (CWE-1286) enables parsing of octal or hexadecimal formats (CWE-1389), allowing bypass of an SSRF protection mechanism (CWE-918). |
| CVE-2007-5893 | HTTP request with missing protocol version number leads to crash |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2015-10149 | Dancer versions before 1.3400 for Perl pass unvalidated session ids from the session cookie to the session engine | critical | 9.8 | - | No | 2026-11-14 |
| CVE-2026-110759 | Text::CSV\_XS versions before 1.65 for Perl return a 0xFF byte that is not in the input for an empty last field followed by a lone CR in parse | critical | 9.8 | - | No | 2026-10-16 |
| CVE-2026-72201 | ntfs: validate index entries on reading | critical | 9.8 | - | No | 2026-08-15 |
| CVE-2026-102084 | Junos OS: SRX Series: In an ADVPN scenario a malformed message from a peer causes Remote Code Execution | critical | 9.2 | - | No | 2026-10-14 |
| CVE-2026-87080 | Net::IDN::Punycode::PP versions before 2.590 for Perl decode a truncated label to a name containing a character it never encoded in decode\_punycode | critical | 9.1 | - | No | 2026-09-22 |
| CVE-2026-83728 | Windows Hyper-V Spoofing Vulnerability | high | 8.8 | - | No | 2026-10-13 |
| CVE-2026-72160 | ocfs2: reject dinodes with non-canonical i\_mode type | high | 8.8 | - | No | 2026-08-15 |
| CVE-2025-41719 | Sauter: Improper Validation of user-controlled data | high | 8.8 | - | No | 2025-10-22 |
| CVE-2021-31988 | - | high | 8.8 | - | No | 2021-10-05 |
| CVE-2021-28812 | Command Injection Vulnerability in Video Station | high | 8.8 | - | No | 2021-06-03 |
| CVE-2020-6413 | Inappropriate implementation in Blink | high | 8.8 | - | No | 2020-02-11 |
| CVE-2026-123572 | Hickory-dns 0.20.1 before 0.26.2 Panic DoS via SVCB/HTTPS Zone Parser | high | 8.7 | - | No | 2026-11-08 |

## Related attack patterns (CAPEC)

- [CAPEC-66](https://radicalnotion.ai/capec/capec-66): SQL Injection
- [CAPEC-676](https://radicalnotion.ai/capec/capec-676): NoSQL Injection

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-20](https://radicalnotion.ai/cwe/cwe-20) | Improper Input Validation |
| Child | [CWE-112](https://radicalnotion.ai/cwe/cwe-112) | Missing XML Validation |

## Frequently asked questions

### What is CWE-1286?

The product receives input that is expected to be well-formed - i.e., to comply with a certain syntax - but it does not validate or incorrectly validates that the input complies with the syntax.

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

101 recorded CVEs are attributed to CWE-1286, including CVE-2015-10149, CVE-2026-110759 and CVE-2026-72201.

### How do you prevent CWE-1286?

Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

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

Exploiting CWE-1286 can lead to: Varies by Context.

### Is CWE-1286 actively exploited?

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

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

---

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