SiteShadow
Back to vulnerability library

CWE-93 CRLF Injection

What this means

SiteShadow flagged untrusted input that may include CRLF characters (\r\n) being used in outputs like headers, redirects, logs, or generated responses.

Why it matters

CRLF injection can split responses or inject headers.

Safer examples

1) Reject \r and \n in header/redirect values

function rejectCRLF(value) {
  if (/[\\r\\n]/.test(value)) throw new Error("Invalid characters");
  return value;
}

2) Don't put user input directly into headers

Use server-generated values or allowlists (see CWE-113).

3) Use framework APIs rather than manual header concatenation

Framework helpers often normalize safely; avoid building raw header strings.

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Request access View coverage