Skip to content
DoS Disclosed report Intermediate CVE-2021-32640

Regular Expression Denial of Service vulnerability

The report identifies a vulnerable dependency (ws) within the subscriptions-transport-ws package used by the target, which is susceptible to a regular expression denial of service (ReDoS). An attacker could potentially exploit this to cause a denial of service, though the reporter did not attempt exploitation due to policy restrictions.

dingleberryfarts Follow

Originally disclosed on HackerOne

  • Disclosed after 13 hours

Summary:

The vulnerability I have found is classified as a Regular Expression Denial of Service. While inspecting the source code file RealtimeGQLSubscriptionAsync.js I came across the node_module subscriptions-transport-ws (See Screenshot 1). The search result of the subscriptions-transport-ws package on npmjs.com displayed a large deprecation warning at the top of the page (See Screenshot 2) so I decided to research further. The read-me file within the package github repository states that the package has been largely unmaintained since 2018 and that users should migrate to graphql-ws (See Screenshot 3). Doing a quick search in the issues tab for the keyword "vulnerability" I came across an issue where the github user PabloJomer pointed out that the package.json lists a vulnerable dependency called ws (See Screenshot 4) The vulnerable package is listed on the NIST National Vulnerability Database under CVE-2021-32640 with a Base Score of 5.3. Further details and a PoC can be found on the Snyk Vulnerability database located here (See Screenshot 5).

The policy has some conflicting information so I wasn't exactly sure about what I should do about this vulnerability. The out-of-scope section states "Previously known vulnerabilities without a working Proof of Concept" but two sections later it is states to not attempt denial of services attacks. (See screenshot 5) The vulnerability I have found is a Regular expression denial of service but I am strictly forbidden from attempting any denial of service attacks. I believe I have clearly outlined the existence of a vulnerable dependency within you domain and if given the opportunity I could successfully execute the PoC vulnerability as described in the snyk link mentioned above.

Impact:

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.

The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.

Supporting Material/References:

OWASP - Regular expression Denial of Service - ReDos

Impact

The ReDos vulnerability can be used to take down your entire site.

Attachments

one.png
one.png From the original on HackerOne
two.png
two.png
three.png
three.png
four.png
four.png
five.png
five.png
six.png
six.png

The original report as published on HackerOne, by dingleberryfarts. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the outdated subscriptions-transport-ws package depends on a vulnerable version of the ws library that contains a ReDoS flaw.

Impact

The ReDoS vulnerability could be used to take down the entire site, but the reporter did not attempt exploitation due to policy restrictions.

What the attacker needed

Access to the vulnerable component; ability to trigger the ReDoS

The fix

The package should be updated to a non-vulnerable version or migrated to graphql-ws as recommended by the maintainers.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A regular expression denial of service (ReDoS) happens when a pattern-matching function takes a very long time on specially crafted input, making the server unresponsive. Here, an old library used by the website includes a vulnerable component that could be abused to slow down or crash the service.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More from Reddit

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.