---
title: "CWE-1287: Improper Validation of Specified Type of Input"
url: https://radicalnotion.ai/cwe/cwe-1287
type: cwe
description: "The product receives input that is expected to be of a certain type, but it does not validate or incorrectly validates that the input is actually of the expected type."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-1287: Improper Validation of Specified Type of Input

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

## Description

The product receives input that is expected to be of a certain type, but it does not validate or incorrectly validates that the input is actually of the expected type.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | This weakness can appear in type-unsafe programming languages, or in programming languages that support casting or conversion of an input to another type. If the application itself infers a "type" of input without directly using the types as defined in the language, then this weakness could occur regardless of the programming language. |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Other | Varies by Context | When input does not comply with the expected type, attackers could trigger unexpected errors, cause incorrect actions to take place, or exploit latent vulnerabilities that would not be possible if the input conformed with the expected type. |

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

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2024-37032 | Large language model (LLM) management tool does not validate the format of a digest value (CWE-1287) from a private, untrusted model registry, enabling relative path traversal (CWE-23), a.k.a. Probllama |
| CVE-2008-2223 | SQL injection through an ID that was supposed to be numeric. |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2024-4879 | Jelly Template Injection Vulnerability in ServiceNow UI Macros | critical | 9.3 | - | Yes | 2024-07-10 |
| CVE-2026-76964 | Memory Corruption Vulnerability in SAP NetWeaver AS ABAP (Internet Communication Manager) | critical | 10.0 | - | No | 2026-11-10 |
| CVE-2026-13312 | A vulnerability that could allow an attacker to compromise a system. | critical | 9.9 | - | No | 2026-11-10 |
| CVE-2026-44935 | Rancher Fleet vulnerable to cross namespace secret disclosure via unvalidated \`valuesFrom\` references in Helm Deployer | critical | 9.9 | - | No | 2026-07-02 |
| CVE-2026-123710 | Quay: red hat quay: unauthenticated registry signing-key takeover via service key rotation | critical | 9.8 | - | No | 2026-11-11 |
| CVE-2026-123776 | RRD::CGI::Image versions through 0.01 for Perl pass CGI query parameters containting "tz" to tzset(), , so a FIFO or device path blocks the CGI process | critical | 9.8 | - | No | 2026-11-07 |
| CVE-2026-98336 | wifi: mac80211: don't offload TC setup on AP\_VLAN interfaces | critical | 9.8 | - | No | 2026-10-06 |
| CVE-2021-32024 | - | critical | 9.8 | - | No | 2021-12-13 |
| CVE-2024-6298 | remote code execution | critical | 9.4 | - | No | 2024-07-05 |
| CVE-2026-24307 | M365 Copilot Information Disclosure Vulnerability | critical | 9.3 | - | No | 2026-01-22 |
| CVE-2024-51551 | Default Credentials | critical | 9.3 | - | No | 2024-12-05 |
| CVE-2024-51550 | Data Validation / Sanitization | critical | 9.3 | - | No | 2024-12-05 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-20](https://radicalnotion.ai/cwe/cwe-20) | Improper Input Validation |
| Peer | [CWE-843](https://radicalnotion.ai/cwe/cwe-843) | Access of Resource Using Incompatible Type |

## Frequently asked questions

### What is CWE-1287?

The product receives input that is expected to be of a certain type, but it does not validate or incorrectly validates that the input is actually of the expected type.

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

203 recorded CVEs are attributed to CWE-1287, including CVE-2024-4879, CVE-2026-76964 and CVE-2026-13312. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How do you prevent CWE-1287?

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-1287?

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

### Is CWE-1287 actively exploited?

Yes. 1 CWE-1287 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 203 recorded CVEs.

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

---

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