# Improper Handling of Extra Parameters (CWE-235) The product does not handle or incorrectly handles when the number of parameters, fields, or arguments with the same name exceeds the expected amount. **Stack:** Python - Prevalence: Mittel 2 Sprachen abgedeckt - Impact: Mittel Review empfohlen - Prevention: Dokumentiert 2 Fix-Beispiele **OWASP:** Injection (A03:2021-Injection) - #3 ## Description When applications receive duplicate parameters, they may process them inconsistently, leading to security bypasses or logic errors. Different frameworks may select the first, last, or combine duplicate parameters. ## Prevention Präventionsstrategien für Improper Handling of Extra Parameters basierend auf 1 Shoulder-Erkennungsregeln. ### Python Explicitly check for and reject duplicate HTTP parameters ## Warning Signs - [MEDIUM] handling of duplicate HTTP parameters without proper validation ## Consequences - Schutzmechanismus umgehen - Anwendungsdaten ändern ## Mitigations - Eine Richtlinie für den Umgang mit doppelten Parametern festlegen und durchsetzen - Anfragen mit doppelten sicherheitsrelevanten Parametern ablehnen - Verwende Frameworks, die Duplikate konsistent behandeln ## Detection - Total rules: 2 - Languages: javascript, typescript, python ## Rules by Language ### Python (1 rules) - **HTTP Parameter Pollution** [MEDIUM]: Detects handling of duplicate HTTP parameters without proper validation. - Remediation: Check for duplicate parameters and reject requests with unexpected multiples. ```python if len(request.args.getlist('param')) > 1: return "Duplicate parameters not allowed", 400 ``` Learn more: https://shoulder.dev/learn/python/cwe-235/parameter-pollution