Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1310 CNY

100%

CWE-1286 — Vulnerability Class 64

64 vulnerabilities classified as CWE-1286. AI Chinese analysis included.

CWE-1286 represents a critical input validation weakness where software fails to verify that incoming data adheres to its expected syntactic structure. Attackers typically exploit this flaw by injecting malformed or syntactically incorrect payloads, such as broken JSON, XML, or HTTP headers, which the application processes without proper checks. This oversight can lead to severe consequences, including injection attacks, parsing errors, or unexpected application behavior that may be leveraged for further exploitation. To mitigate this risk, developers must implement rigorous validation routines that strictly enforce syntax rules before processing any input. Utilizing robust parsing libraries, defining clear schema definitions, and rejecting any data that deviates from the expected format are essential practices. By ensuring syntactic correctness early in the pipeline, organizations can prevent malformed data from triggering vulnerabilities and maintain system integrity against adversarial inputs.

MITRE 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. 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. 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.
Common Consequences (1)
OtherVaries by Context
Mitigations (1)
ImplementationAssume 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…
Effectiveness: High
Examples (1)
The following code loads and parses an XML file.
// Read DOM try { ... DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating( false ); .... c_dom = factory.newDocumentBuilder().parse( xmlFile ); } catch(Exception ex) { ... }
Bad · Java
CVE IDTitleCVSSSeverityPublished
CVE-2021-31988 Axis Os 注入漏洞 — AXIS OS 8.8 -2021-10-05
CVE-2021-31987 Axis OS 安全漏洞 — AXIS OS 7.4 -2021-10-05
CVE-2021-28812 Command Injection Vulnerability in Video Station — Video Station 8.8 High2021-06-03
CVE-2020-16220 Philips Patient Monitoring Devices Improper Validation of Syntactic Correctness of Input — Patient Information Center iX (PICiX) 6.5 -2020-09-11

Vulnerabilities classified as CWE-1286 represent 64 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.