Skip to content

Entity provides unexpected data

Definition

An entity can influence system's behaviour by providing it with specially crafted inputs.

Context

The system receives, and processes, data from an (uncontrolled) entity.

Attacker capabilities

  • Attacker can send data to the system; and
  • can freely craft the sent data elements.

Explanation

An uncontrolled entity that sends data to the system can freely construct the data elements it sends to the system. Consequently, this entity might send data elements that are not expected by the system and when processed can lead to violating the security requirements of the system. Some common examples are data elements specially crafted such that

  • processing them takes up significant resources or crashes (part of) the system, resulting in a denial of service;
  • they execute arbitrary code upon processing, typically code that is not part of the system's intended functionality;
  • they can bypass security measures that are in place, e.g. bypass authorisation checks by packaging a query in a different type of request; or
  • it contains more data, e.g. personally identifiable information (PII), than the system should, or is allowed to, process, e.g. with respect to legislation such as the GDPR.

This problem is included in:

  • A03: Injection in the OWASP Top 10
  • A10: Server Side Request Forgery (SSRF) in the OWASP Top 10
  • API4: Lack of Resources & Rate Limiting in the OWASP API Security Top 101
  • API6: Mass Assignment in the OWASP API Security Top 101
  • API8: Injection in the OWASP API Security Top 101
  • Earn or Give, but Never assume Trust in IEEE's Top 10 Security design flaws2
  • Strictly Separate Data and Control Instructions, and Never Process Control Instructions Received from Untrusted Sources in IEEE's Top 10 Security design flaws2
  • Define an Approach that Ensures all Data are Explicitly Validated in IEEE's Top 10 Security design flaws2

Examples

  • An attacker specially crafts the arguments it provides for a SQL database query to retrieve more than it should be able to. As illustrated in the example attack scenarios of OWASP's A03 Injection.
  • An attacker inserts OS commands into the data it provides which are subsequently executed by the system resulting in, for example, part of the system shutting down or the formatting of a disk.1
  • An entity uploads a large file, e.g. an image or document, that cannot be properly processed by the system resulting in a (partial) system crash.

Possible solutions


  1. P. Silva, ‘OWASP API Security Top 10 2019 - The Ten Most Critical API Security Risks’, 'API8: Injection'. [Online]. Available: https://owasp.org/www-project-api-security/ ↩↩↩↩

  2. I. Arce et al., ‘Avoiding the Top 10 Software Security Design Flaws’, IEEE, 2014. [Online]. Available: https://cybersecurity.ieee.org/blog/2015/11/13/avoiding-the-top-10-security-flaws/ ↩↩↩


Last update: February 7, 2022