Exploiting Input Sanitization for Regex Denial of Service

03/03/2023
by   Efe Barlas, et al.
0

Web services use server-side input sanitization to guard against harmful input. Some web services publish their sanitization logic to make their client interface more usable, e.g., allowing clients to debug invalid requests locally. However, this usability practice poses a security risk. Specifically, services may share the regexes they use to sanitize input strings – and regex-based denial of service (ReDoS) is an emerging threat. Although prominent service outages caused by ReDoS have spurred interest in this topic, we know little about the degree to which live web services are vulnerable to ReDoS. In this paper, we conduct the first black-box study measuring the extent of ReDoS vulnerabilities in live web services. We apply the Consistent Sanitization Assumption: that client-side sanitization logic, including regexes, is consistent with the sanitization logic on the server-side. We identify a service's regex-based input sanitization in its HTML forms or its API, find vulnerable regexes among these regexes, craft ReDoS probes, and pinpoint vulnerabilities. We analyzed the HTML forms of 1,000 services and the APIs of 475 services. Of these, 355 services publish regexes; 17 services publish unsafe regexes; and 6 services are vulnerable to ReDoS through their APIs (6 domains; 15 subdomains). Both Microsoft and Amazon Web Services patched their web services as a result of our disclosure. Since these vulnerabilities were from API specifications, not HTML forms, we proposed a ReDoS defense for a popular API validation library, and our patch has been merged. To summarize: in client-visible sanitization logic, some web services advertise ReDoS vulnerabilities in plain sight. Our results motivate short-term patches and long-term fundamental solutions.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/16/2019

Effect of Serialized Messaging on Web Services Performance

Serialized messages are processed at the server and sent as objects over...
research
10/16/2021

Characterizing Improper Input Validation Vulnerabilities of Mobile Crowdsourcing Services

Mobile crowdsourcing services (MCS), enable fast and economical data acq...
research
06/19/2019

A survey of OpenRefine reconciliation services

We review the services implementing the OpenRefine reconciliation API, c...
research
12/27/2022

Poseidon: Non-server WEB Forms Off-line Processing System

The proposed Poseidon system is based on email services of filled forms ...
research
05/09/2022

Static Analysis for AWS Best Practices in Python Code

Amazon Web Services (AWS) is a comprehensive and broadly adopted cloud p...
research
09/24/2018

The Struggle is Real: Analyzing Ground Truth Data of TLS (Mis-)Configurations

As of today, TLS is the most commonly used protocol to protect communica...
research
12/13/2021

Serverless Architecture for Bulk Email Management

Sending emails in large quantities can be tedious considering free servi...

Please sign up or login with your details

Forgot password? Click here to reset