Wiz Agents & Workflows are here
Vulnerability DatabaseGHSA-mh55-gqvf-xfwm

GHSA-mh55-gqvf-xfwm
vulnerability analysis and mitigation

Overview

A denial of service vulnerability was discovered in github.com/rs/cors versions 1.9.0 through 1.10.0. The middleware causes excessive heap allocations when processing malicious preflight requests that include an Access-Control-Request-Headers (ACRH) header containing many commas. This vulnerability was disclosed on July 5, 2024, and was assigned the identifier GHSA-mh55-gqvf-xfwm (GitHub Advisory).

Technical details

The vulnerability stems from inefficient processing of the Access-Control-Request-Headers header in preflight requests. When handling malicious preflight requests with ACRH headers containing numerous commas, the middleware performs prohibitive heap allocations. Testing showed that processing a single 1-MiB malicious preflight request could take 127ms of execution time and consume approximately 116 MiB of heap allocations (CORS Issue).

Impact

This vulnerability could be exploited by attackers to cause denial of service by generating undue load on servers using the middleware. The impact is particularly significant because CORS middleware typically runs before authentication, meaning attackers don't need to be authenticated to exploit it. Local testing demonstrated that concurrent sending of malicious preflight requests could cause memory exhaustion in containers with limited memory (CORS Issue).

Mitigation and workarounds

The vulnerability has been fixed in version 1.11.0 of github.com/rs/cors. The fix involves normalizing allowed request headers and storing them in a sorted set, taking advantage of guarantees provided by the Fetch standard regarding the format of CORS-unsafe request header names (CORS PR).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management