# GHSA-4g53-vp7q-gfjv: constructEvent does not verify header

> Attackers can bypass Stripe webhook signature verification, allowing them to send forged events to applications using this library.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 May 2021

## What is GHSA-4g53-vp7q-gfjv?

GHSA-4g53-vp7q-gfjv is a vulnerability in @worker-tools/stripe-webhook, published on 28 May 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact
Anyone verifying a Stripe webhook request via this library's `constructEvent` function.

### Patches
Upgrade to 1.1.4. 

### Workarounds
Use `await verifyHeader(...)` directly instead of `constructEvent`.

### References
https://github.com/worker-tools/stripe-webhook/issues/1

## Which versions are affected by GHSA-4g53-vp7q-gfjv?

2 open source packages ship an affected version, including @worker-tools/stripe-webhook.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@worker-tools/stripe-webhook` | npm | All versions | 1.1.4 |
| `@worker-tools/stripe-webhook` | npm | All versions | 1.1.4 |

## How do I fix GHSA-4g53-vp7q-gfjv?

Upgrade @worker-tools/stripe-webhook to 1.1.4 or later.

## Is GHSA-4g53-vp7q-gfjv being exploited?

There is no known exploitation of GHSA-4g53-vp7q-gfjv in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-4g53-vp7q-gfjv and fix it if it is affected.

What it is: GHSA-4g53-vp7q-gfjv is a vulnerability in @worker-tools/stripe-webhook, published on 28 May 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-4g53-vp7q-gfjv in the wild and no public exploit code.

Affected packages and fixed versions:
- @worker-tools/stripe-webhook (npm): affected all versions; fixed in 1.1.4
- @worker-tools/stripe-webhook (npm): affected all versions; fixed in 1.1.4

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-4g53-vp7q-gfjv/ (Markdown: https://insights.sbomify.com/GHSA-4g53-vp7q-gfjv/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-4g53-vp7q-gfjv

---
From sbomify Insights: https://insights.sbomify.com/GHSA-4g53-vp7q-gfjv/
Summaries are generated and may contain mistakes; the official description above is the record.
