Skip to content

DEF CON 34 talks are here: 354 talks, summarized and searchable.

Browse DEF CON 34

Parsing Differential Problem

Cher Boon Sim

AppSecGround Floor15 minIntermediateOpen on YouTube ↗

Where

Ground Floor
BSides Las Vegas

Duration

15 min

Shows how repeated URL parameters parsed differently across frameworks can let malicious input slip past front-end checks.

Summary

The talk introduces the parsing differential problem, where two components read the same input differently and undermine assumptions about how data is handled. The speaker, a software engineer who also lectures part-time, explains how systems grow from a monolith into services written in several languages, often chosen for whatever the team finds easiest. That mix is where the gap appears.

The central example compares a Go service and a Django service reading a query parameter that appears twice. Go's accessor returns the first value while Django's returns the last, so a value that passes a check in one layer can become an SQL injection payload in the next. The speaker notes the idea has appeared in web security literature for about a decade, in HTTP parameter pollution research, and in a recent GitLab case that enabled file reads or writes. A community-maintained list of payloads is also mentioned.

Standards such as the URI specification do not define how repeated parameters should be handled, and behavior varies across PHP, Node.js, Python frameworks, and even request bodies and headers. Practical steps include knowing which parsers sit in the stack, avoiding assumptions of uniform behavior, writing tests for these edge cases, and normalizing input at the API gateway before it reaches downstream services. The talk closes by raising the same question for multi-cloud environments.

Related talks