GHSA-c35v-qwqg-87jc express-basic-auth Timing Attack due to native string comparison instead of constant time string comparison

Not scored Published

Attackers can exploit timing differences in string comparison to efficiently brute-force basic authentication credentials.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-c35v-qwqg-87jc?

GHSA-c35v-qwqg-87jc is a vulnerability in express-basic-auth, published on 6 Jun 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Versions of express-basic-auth prior to 1.1.7 are vulnerable to Timing Attacks. The package uses native string comparison instead of a constant time string comparison, which may lead to Timing Attacks. Timing Attacks can be used to increase the efficiency of brute-force attacks by removing the exponential increase in entropy gained from longer secrets.

Recommendation

Upgrade to version 1.1.7 or later.

Which versions are affected by GHSA-c35v-qwqg-87jc?

2 open source packages ship an affected version, including express-basic-auth.

PackageAffectedFixed in
express-basic-auth npmAll versions1.1.7
express-basic-auth npmAll versions1.1.7

How do I fix GHSA-c35v-qwqg-87jc?

Upgrade express-basic-auth to 1.1.7 or later.

Is GHSA-c35v-qwqg-87jc being exploited?

There is no known exploitation of GHSA-c35v-qwqg-87jc in the wild and no public exploit code.

Sources

Is GHSA-c35v-qwqg-87jc in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free