> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# trust-boundary-violation

> Request data is stored in application-wide state that later requests trust.

## What it flags

Request data written into application-wide state without validation: Express `app.locals` (also through `req.app.locals` or `res.app.locals`), directly, by element or through `Object.assign`, and Koa `ctx.app.context`. Every later request and every rendered view reads that state as trusted, so one caller's input reaches all users (CWE-501).

Values that pass an anchored allowlist (a regular expression test or a schema pattern) or are coerced to numbers stay quiet. Per-request state (`res.locals`) and per-user stores such as the session are not reported: storing the caller's own input there is routine.

## How to review or fix

Validate the value against an allowlist before storing it, or keep it in per-request or per-user state.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "trust-boundary-violation": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.