# GHSA-8r4g-cg4m-x23c: Denial of Service in node-static

> Attackers can crash the server by sending requests with null bytes, causing a denial of service.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 22 Sep 2021

## What is GHSA-8r4g-cg4m-x23c?

GHSA-8r4g-cg4m-x23c is a denial of service vulnerability in node-static, published on 22 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

All versions of node-static are vulnerable to a Denial of Service. The package fails to catch an exception when user input includes null bytes. This allows attackers to access `http://host/%00` and crash the server.

## Which versions are affected by GHSA-8r4g-cg4m-x23c?

2 open source packages ship an affected version, including node-static.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `node-static` | npm | All versions to 0.7.11 | None |
| `node-static` | npm | All versions to 0.7.11 | None |

## How do I fix GHSA-8r4g-cg4m-x23c?

No fix has been published for GHSA-8r4g-cg4m-x23c yet. Limit exposure of the affected software until one is available.

## Is GHSA-8r4g-cg4m-x23c being exploited?

There is no known exploitation of GHSA-8r4g-cg4m-x23c in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-8r4g-cg4m-x23c and fix it if it is affected.

What it is: GHSA-8r4g-cg4m-x23c is a denial of service vulnerability in node-static, published on 22 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-8r4g-cg4m-x23c in the wild and no public exploit code.

Affected packages and fixed versions:
- node-static (npm): affected all versions up to 0.7.11; no fix listed
- node-static (npm): affected all versions up to 0.7.11; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-8r4g-cg4m-x23c/ (Markdown: https://insights.sbomify.com/GHSA-8r4g-cg4m-x23c/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-8r4g-cg4m-x23c

---
From sbomify Insights: https://insights.sbomify.com/GHSA-8r4g-cg4m-x23c/
Summaries are generated and may contain mistakes; the official description above is the record.
