Skip to content

CWE-1289: Improper Validation of Unsafe Equivalence in Input

Base

The product receives an input value that is used as a resource identifier or other type of reference, but it does not validate or incorrectly validates that the input is equivalent to a potentially-unsafe value.

Attackers can sometimes bypass input validation schemes by finding inputs that appear to be safe, but will be dangerous when processed at a lower layer or by a downstream component. For example, a simple XSS protection mechanism might try to validate that an input has no "<script>" tags using case-sensitive matching, but since HTML is case-insensitive when processed by web browsers, an attacker could inject "<ScrIpT>" and trigger XSS.

Consequences

  • Other: Varies by Context

How to prevent it

  • Implementation: 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.

Recent advisories

  • GHSA-p8wg-vrv2-v86f — Handlebars: JavaScript Injection via Own Property Check Bypass
  • EEF-CVE-2026-88255 — mpp Tempo keys its pre-broadcast dedup reserve on the caller-supplied transaction encoding, so a re-encoded signed transaction reserves a second slot
  • GHSA-xrhx-7g5j-rcj5 — Hono: IP Restriction bypasses static deny rules for non-canonical IPv6
  • GHSA-86qp-5c8j-p5mr — Starlette has missing Host header validation that poisons request.url.path, bypassing path-based security checks
  • GO-2026-5026 — Invoking failure to reject ASCII-only Punycode-encoded labels in golang.org/x/net/idna
  • GHSA-crv5-9vww-q3g8 — DOMPurify has a SAFE_FOR_TEMPLATES bypass in RETURN_DOM mode
  • GHSA-3p68-rc4w-qgx5 — Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF
  • GO-2026-4866 — Case-sensitive excludedSubtrees name constraints cause Auth Bypass in crypto/x509
  • GHSA-h6c8-cww8-35hf — OpenFGA has an Authorization Bypass through cached keys
  • GHSA-247c-9743-5963 — Fastify has a Body Schema Validation Bypass via Leading Space in Content-Type Header
  • GHSA-m9gf-397r-hwpg — AngularJS allows attackers to bypass common image source restrictions

All advisories for CWE-1289

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor