liveBook · Manning

Malicious data

As explained in Secure APIs

Malicious input is data deliberately crafted to exploit an application's parsing, processing, or business logic.

Malicious data is deliberately crafted input intended to exploit an application’s parsing, processing, or business logic. It can include SQL statements or execution commands that cause serious damage when accepted by a server. section 3.3

Client-side validation cannot establish trust: users can call backend APIs with any client, and attackers may send crafted requests directly. Treat every incoming value—and data from APIs, services, responses, and databases—as untrusted. section 3.3

An indirect injection through identity data

A threat actor places malicious code in an external identity provider profile. When the actor registers, the application imports the profile and executes the code against its database, potentially dropping the users table.

Reduce exposure and improve investigation by:

  • Validate all data at server boundaries, regardless of origin, and enforce the constraints required by each data model. section 3.3
  • Record suspicious requests, injection indicators, 401/403 and 400/422 responses, unusual latency, headers, bodies, and full URLs when appropriate. section 11.5

How Secure APIs covers it

How deep it goes
Defines injection risks, traces indirect data flows, and gives validation and logging practices without detailing exploit mechanics.
Examples
Uses SQL or execution commands, a malicious identity-provider profile, suspicious status codes, unusual latency, and request-log examples.
What you can do after
Diagnose input-based attacks by validating data, recognizing suspicious responses and latency, and reproducing requests from carefully filtered logs.
How it connects
Connects malicious data with input validation, SQL injection, script injection, zero-trust APIs, logging, and observability.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.