Common Weakness Enumeration

CWE-1287

Weakness Allowed

Improper Validation of Specified Type of Input

Abstraction: Base · Status: Incomplete

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.

Dimensions

  • Behavior-Type: Validation
  • Behavior-Property: Improper
  • Input-Type: Input
  • Input-Property: Specified Type
Mapping guidance

This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.

Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

Relationships and members
ChildOf: CWE-20 · View CWE-1000
PeerOf: CWE-843 (symmetric) · View CWE-1000
Modes of introduction
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.

Notes

Maintenance

This entry is still under development and will continue to see updates and content improvements.

Content history
Submission: CWE Content Team · MITRE · 2020-06-24 · CWE 4.1
Modification: CWE Content Team · MITRE · 2023-04-27 · CWE 4.11

updated Relationships

Modification: CWE Content Team · MITRE · 2023-06-29 · CWE 4.12

updated Mapping_Notes

Modification: CWE Content Team · MITRE · 2024-07-16 · CWE 4.15

updated Observed_Examples

Modification: CWE Content Team · MITRE · 2025-12-11 · CWE 4.19

updated Weakness_Ordinalities

Modification: CWE Content Team · MITRE · 2026-10-28 · CWE 5.0

updated Common_Consequences, Description, Dimensions, Modes_of_Introduction

341 vulnerabilities reference this CWE, most recent first.

GHSA-XPCC-633M-7GCQ

Vulnerability from github – Published: 2026-11-10 06:31 – Updated: 2026-11-10 06:31
VLAI
Details

Improper shell quote escaping when processing user-controlled input, potentially allowing command injection, which could lead to privilege escalation.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-63282"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1287"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-10T06:17:09Z",
    "severity": "MODERATE"
  },
  "details": "Improper shell quote escaping when processing user-controlled input, potentially allowing command injection, which could lead to privilege escalation.",
  "id": "GHSA-xpcc-633m-7gcq",
  "modified": "2026-11-10T06:31:29Z",
  "published": "2026-11-10T06:31:29Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-63282"
    },
    {
      "type": "WEB",
      "url": "https://www.axis.com/dam/public/c5/06/79/cve-2026-63282pdf-en-US-561259.pdf"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ]
}

Mitigation MIT-5
Implementation

Strategy: 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.

No CAPEC attack patterns related to this CWE.