COMMON WEAKNESS ENUMERATIONIncomplete

CWE-795

Only Filtering Special Elements at a Specified Location

The product receives data from an upstream component, but only accounts for special elements at a specified location, thereby missing remaining special elements that may exist before sending it to a downstream component.

Abstraction

Base

Structure

Simple

Likelihood of Exploit

Medium

Understand the problem

What is the problem?

The product receives data from an upstream component, but only accounts for special elements at a specified location, thereby missing remaining special elements that may exist before sending it to a downstream component.

Extended description

A filter might only account for instances of special elements when they occur: - relative to a marker (e.g. "at the beginning/end of string; the second argument"), or - at an absolute position (e.g. "byte number 10"). This may leave special elements in the data that did not match the filter position, but still may be dangerous.

Root cause

How and when does the problem arise?

Lifecycle phase

Implementation

REALIZATION: This weakness is caused during implementation of an architectural security tactic.

Risk

What does successful exploitation lead to?

Unexpected State

Affected security scopes: Integrity

Defence

How is it prevented and fixed?

  • Follow secure coding guidelines for input handling and boundary checking.
  • Enforce strict security reviews and automated static analysis (SAST) checks.
CWE-795: Common Weakness Enumeration Entry CWE-795 · DayBreach