# CVE-2023-50728: Unauthenticated Denial of Service in the octokit/webhooks library

> An uncaught exception in the octokit/webhooks library allows unauthenticated attackers to crash the Node.js process, causing denial of service.

- **Severity:** Medium 5.4 (`CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 15 Dec 2023
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-pwfr-8pq7-x9qv

## What is CVE-2023-50728?

CVE-2023-50728 is a medium-severity denial of service vulnerability in octokit webhooks.js, published on 15 Dec 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

octokit/webhooks is a GitHub webhook events toolset for Node.js. Starting in 9.26.0 and prior to 9.26.3, 10.9.2, 11.1.2, and 12.0.4, there is a problem caused by an issue with error handling in the @octokit/webhooks library because the error can be undefined in some cases. The resulting request was found to cause an uncaught exception that ends the nodejs process.  The bug is fixed in octokit/webhooks.js 9.26.3, 10.9.2, 11.1.2, and 12.0.4, app.js 14.02, octokit.js 3.1.2, and Protobot 12.3.3.

Weakness: CWE-755 (Improper Handling of Exceptional Conditions)

## Which versions are affected by CVE-2023-50728?

14 open source packages ship an affected version, including @octokit/webhooks, @octokit/app and octokit. It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@octokit/webhooks` | npm | All versions | 9.26.3 |
| `@octokit/webhooks` | npm | All versions | 9.26.3 |
| `@octokit/webhooks` | npm | From 10.0.0 | 10.9.2 |
| `@octokit/webhooks` | npm | From 10.0.0 | 10.9.2 |
| `@octokit/webhooks` | npm | From 11.0.0 | 11.1.2 |
| `@octokit/webhooks` | npm | From 11.0.0 | 11.1.2 |
| `@octokit/webhooks` | npm | From 12.0.0 | 12.0.3 |
| `@octokit/webhooks` | npm | From 12.0.0 | 12.0.3 |
| `@octokit/app` | npm | From 14.0.1 | 14.0.2 |
| `@octokit/app` | npm | From 14.0.1 | 14.0.2 |
| `octokit` | npm | All versions | 3.1.2 |
| `octokit` | npm | All versions | 3.1.2 |
| `probot` | npm | All versions | 12.3.3 |
| `probot` | npm | All versions | 12.3.3 |

Products: Octokit App, Octokit Octokit, Octokit Webhooks, Probot Probot.

## How do I fix CVE-2023-50728?

Upgrade @octokit/webhooks to a fixed version for your release line: 9.26.3, 10.9.2, 11.1.2 or 12.0.3.

## Is CVE-2023-50728 being exploited?

There is no known exploitation of CVE-2023-50728 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-50728 and fix it if it is affected.

What it is: CVE-2023-50728 is a medium-severity denial of service vulnerability in octokit webhooks.js, published on 15 Dec 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-50728 in the wild and no public exploit code.

Affected packages and fixed versions:
- @octokit/webhooks (npm): affected all versions; fixed in 9.26.3
- @octokit/webhooks (npm): affected all versions; fixed in 9.26.3
- @octokit/webhooks (npm): affected from 10.0.0; fixed in 10.9.2
- @octokit/webhooks (npm): affected from 10.0.0; fixed in 10.9.2
- @octokit/webhooks (npm): affected from 11.0.0; fixed in 11.1.2
- @octokit/webhooks (npm): affected from 11.0.0; fixed in 11.1.2
- @octokit/webhooks (npm): affected from 12.0.0; fixed in 12.0.3
- @octokit/webhooks (npm): affected from 12.0.0; fixed in 12.0.3
- @octokit/app (npm): affected from 14.0.1; fixed in 14.0.2
- @octokit/app (npm): affected from 14.0.1; fixed in 14.0.2
- octokit (npm): affected all versions; fixed in 3.1.2
- octokit (npm): affected all versions; fixed in 3.1.2

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/CVE-2023-50728/ (Markdown: https://insights.sbomify.com/CVE-2023-50728/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-50728
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-50728
- OSV: https://osv.dev/vulnerability/CVE-2023-50728

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-50728/
Summaries are generated and may contain mistakes; the official description above is the record.
