Skip to main content
VulnerabilityPublished

better-helperjs Vulnerable to Directory Traversal via String Prefix Bypass in Static Server

Affects better-helperjsSource GCVE Database

0

CVSS 7.5 High : upgrade to 3.0.6 soon.

Data as of 26 Jun 2026, 22:06 UTC

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 3.0.6
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

What to do

Upgrade better-helperjs to 3.0.6.

Affected software

ProductAffectedFixed in
npmbetter-helperjsAffected
  • <3.0.6
Fixed in
  • 3.0.6

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

An official patch is available in better-helperjs version 3.0.6 and later, which fixes the path validation logic to prevent prefix-based directory traversal. Users should upgrade to version 3.0.6 or newer. If upgrading is not immediately possible, users should ensure that no sensitive directories with names sharing the static root directory's prefix are deployed adjacent to the static files directory to mitigate the risk.

Description

A directory traversal vulnerability exists in better-helperjs static file server versions up to 3.0.5. The vulnerability arises from improper path validation using string prefix checks, allowing attackers to access files in adjacent directories with names sharing the static root directory's prefix. This flaw enables unauthorized reading of sensitive files outside the intended public directory. The issue is fixed in version 3.0.6 by enforcing exact path boundary checks. No known exploits are reported in the wild.

References

Community reviews

Loading reviews…