Parameter Pollution
Description
Parameter Pollution occurs when an application processes multiple parameters with the same name, potentially leading to unexpected behavior or security vulnerabilities.
Example with Scenario
Scenario: A web application processes query parameters for user authentication. An attacker can craft a URL with duplicate parameters to bypass authentication or manipulate application behavior.
Payloads and Test Cases
Payloads
Bypassing Authentication:
Manipulating Values:
Changing Logic:
Test Cases
Bypassing Authentication:
Payload:
Test Case:
Manipulating Values:
Payload:
Test Case:
Changing Logic:
Payload:
Test Case:
Mitigation
Parameter Validation:
Validate parameters to ensure they are unique and meet expected criteria.
Reject requests with duplicate parameters.
Use a Single Parameter Source:
Use a single source of parameters (e.g., query string, POST body) to avoid confusion.
Avoid mixing parameters from different sources.
Sanitize Input:
Sanitize and normalize parameter input to prevent unexpected behavior.
Implement strict parameter parsing and validation.
Framework Protections:
Use frameworks and libraries that automatically handle parameter pollution.
Enable built-in protections against parameter pollution vulnerabilities.
Last updated