Docs / Detectors / HPP

HPP (HTTP Parameter Pollution)

Two different frameworks parse ?role=user&role=admin differently. One picks the first value, one picks the last, one returns an array. Attackers exploit that gap to bypass validation in the proxy and reach a different value in your handler.

What it catches

Sample

// Before (URL)
GET /api/users?role=user&role=admin&debug=true&debug=false

// After Arcis normalization (last-value-wins by default)
req.query === { role: "admin", debug: "false" }

// Original multi-value array preserved for auditing
req.queryPolluted === { role: ["user", "admin"], debug: ["true", "false"] }

Configuration

import { hppProtection } from '@arcis/node';

app.use(hppProtection({
  resolution: 'last',        // 'first' | 'last' | 'reject'
  allowedMulti: ['tag', 'category']  // keys that legitimately accept arrays
}));

References