Vulnerabilities in pkg:npm/octokit

PACKAGE
Advisory Identifier: GHSA-pwfr-8pq7-x9qv
Advisory Summary

CVE-2023-50728 is a HIGH (CVSS 8.2) denial of service vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting Probot libraries in the npm ecosystem. The issue involves unauthenticated denial of service in the octokit/webhooks library. Remediation is available by upgrading affected packages to version 12.3.3, 9.26.3, 10.9.2, 11.1.2, 12.0.3, 14.0.2, 3.1.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/octokit

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/octokit. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pwfr-8pq7-x9qv CVE-2023-50728 HIGH Unauthenticated Denial of Service in the octokit/webhooks library

CVE-2023-50728 at a Glance

CVE Identifier CVE-2023-50728
GHSA Identifier GHSA-pwfr-8pq7-x9qv
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-755: Improper Handling of Exceptional Conditions
Affected Product Probot
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability High (A:H)

How to Fix CVE-2023-50728

To remediate this vulnerability, upgrade all affected Probot dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

probot fixed: 12.3.3
npm install probot@12.3.3
@octokit/webhooks fixed: 9.26.3
npm install @octokit/webhooks@9.26.3
@octokit/webhooks fixed: 10.9.2
npm install @octokit/webhooks@10.9.2
@octokit/webhooks fixed: 11.1.2
npm install @octokit/webhooks@11.1.2
@octokit/webhooks fixed: 12.0.3
npm install @octokit/webhooks@12.0.3
@octokit/app fixed: 14.0.2
npm install @octokit/app@14.0.2
octokit fixed: 3.1.2
npm install octokit@3.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls probot

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2023-50728, inspect your project dependencies using npm:

npm ls probot

Analyze the terminal output to locate any version of Probot in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.3.3), your application is affected.

Note: The npm ls probot command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In Probot, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Versions [v9.26.0](https://github.com/octokit/webhooks.js/releases/tag/v9.26.0), [v10.9.x](https://github.com/octokit/webhooks.js/releases/tag/v10.9.1)), [v11.1.x](https://github.com/octokit/webhooks.js/releases/tag/v11.1.1), [v12.0.x](https://github.com/octokit/webhooks.js/releases/tag/v12.0.3) all contained the code that would throw the error. Specifically, during a pentest we encountered a bug in the octokit/webhooks library (a dependency of Probot, a framework for building Github Apps). The resulting request was found to cause an uncaught exception that ends the nodejs process. The problem is caused by an issue with error handling in the @octokit/webhooks library because the error can be undefined in some cases. Credit goes to @pb82 (for the early analysis) and @rh-tguittet (for discovery). ### Patches Maintenance releases for the Error being thrown by the verify method in [octokit/webhooks.js](https://github.com/octokit/webhooks.js) * v12 - [v12.0.4](https://github.com/octokit/webhooks.js/releases/tag/v12.0.4) * v11 - [v11.1.2](https://github.com/octokit/webhooks.js/releases/tag/v11.1.2) * v10 -[v10.9.2](https://github.com/octokit/webhooks.js/releases/tag/v10.9.2) * v9 - [v9.26.3](https://github.com/octokit/webhooks.js/releases/tag/v9.26.3) Maintenance release for the reference for [octokit/webhooks.js](https://github.com/octokit/webhooks.js) in [app.js](https://github.com/octokit/app.js) * [v14.0.2](https://github.com/octokit/app.js/releases/tag/v14.0.2) Maintenance release for the reference for [octokit/webhooks.js](https://github.com/octokit/webhooks.js) in [octokit.js](https://github.com/octokit/octokit.js) * [v3.1.2](https://github.com/octokit/octokit.js/releases/tag/v3.1.2) Maintenance release for the reference for [octokit/webhooks.js](https://github.com/octokit/webhooks.js) in [Protobot](https://github.com/probot/probot) * [v12.3.3](https://github.com/probot/probot/releases/tag/v12.3.3) ### Workarounds It is recommend that all users upgrade to the latest version of [octokit/webhooks.js](https://github.com/octokit/webhooks.js) or use one of the updated back ported versions.

CVE-2023-50728 Affected Probot Versions

7 component(s)
Fixed Versions:
12.3.39.26.310.9.211.1.212.0.314.0.23.1.2
Product / Package Ecosystem Affected Versions Fixed Version
probot
npm
< 12.3.3
12.3.3
@octokit/webhooks
npm
< 9.26.3
9.26.3
@octokit/webhooks
npm
≥ 10.0.0
< 10.9.2
10.9.2
@octokit/webhooks
npm
≥ 11.0.0
< 11.1.2
11.1.2
@octokit/webhooks
npm
≥ 12.0.0
< 12.0.3
12.0.3
@octokit/app
npm
≥ 14.0.1
< 14.0.2
All 1 versions
14.0.1
14.0.2
octokit
npm
< 3.1.2
3.1.2

References

Frequently Asked Questions

What is CVE-2023-50728?
CVE-2023-50728 is a security vulnerability in Probot involving Unauthenticated Denial of Service in the octokit/webhooks library under CWE-755: Improper Handling of Exceptional Conditions.
Which Probot versions are affected?
Affected versions include releases prior to 12.3.3, 9.26.3, 10.9.2, 11.1.2, 12.0.3, 14.0.2, 3.1.2 across affected packages: probot, @octokit/webhooks, @octokit/app, octokit.
What version fixes CVE-2023-50728?
Upgrading to 12.3.3, 9.26.3, 10.9.2, 11.1.2, 12.0.3, 14.0.2, 3.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is probot affected?
Yes, probot is affected in releases prior to 12.3.3. Upgrade your dependency to 12.3.3 or later.
Is @octokit/webhooks affected?
Yes, @octokit/webhooks is affected in releases prior to 9.26.3, 10.9.2, 11.1.2, 12.0.3. Upgrade your dependency to 9.26.3, 10.9.2, 11.1.2, 12.0.3 or later.
What is the CVSS score of CVE-2023-50728?
CVE-2023-50728 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H.
What CWE is associated with CVE-2023-50728?
CVE-2023-50728 is classified under CWE-755: Improper Handling of Exceptional Conditions (The product does not handle or incorrectly handles an exceptional condition.).
How can I check npm dependencies for CVE-2023-50728?
Run the dependency tree command: 'npm ls probot'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pwfr-8pq7-x9qv",
  "modified" : "2023-12-16T00:52:19Z",
  "published" : "2023-12-16T00:52:19Z",
  "aliases" : [ "CVE-2023-50728" ],
  "summary" : "Unauthenticated Denial of Service in the octokit/webhooks library",
  "details" : "### Impact\nVersions [v9.26.0](https://github.com/octokit/webhooks.js/releases/tag/v9.26.0), [v10.9.x](https://github.com/octokit/webhooks.js/releases/tag/v10.9.1)), [v11.1.x](https://github.com/octokit/webhooks.js/releases/tag/v11.1.1), [v12.0.x](https://github.com/octokit/webhooks.js/releases/tag/v12.0.3) all contained the code that would throw the error.\n\nSpecifically, during a pentest we encountered a bug in the octokit/webhooks library (a dependency of Probot, a framework for building Github Apps). The resulting request was found to cause an uncaught exception that ends the nodejs process.\n\nThe problem is caused by an issue with error handling in the @octokit/webhooks library because the error can be undefined in some cases.\n\nCredit goes to @pb82 (for the early analysis) and @rh-tguittet (for discovery). \n\n### Patches\n\nMaintenance releases for the Error being thrown by the verify method in [octokit/webhooks.js](https://github.com/octokit/webhooks.js)\n* v12 - [v12.0.4](https://github.com/octokit/webhooks.js/releases/tag/v12.0.4)\n* v11 - [v11.1.2](https://github.com/octokit/webhooks.js/releases/tag/v11.1.2)\n* v10 -[v10.9.2](https://github.com/octokit/webhooks.js/releases/tag/v10.9.2)\n* v9 - [v9.26.3](https://github.com/octokit/webhooks.js/releases/tag/v9.26.3)\n\nMaintenance release for the reference for [octokit/webhooks.js](https://github.com/octokit/webhooks.js) in [app.js](https://github.com/octokit/app.js)\n* [v14.0.2](https://github.com/octokit/app.js/releases/tag/v14.0.2)\n\nMaintenance release for the reference for [octokit/webhooks.js](https://github.com/octokit/webhooks.js) in [octokit.js](https://github.com/octokit/octokit.js)\n* [v3.1.2](https://github.com/octokit/octokit.js/releases/tag/v3.1.2)\n\nMaintenance release for the reference for [octokit/webhooks.js](https://github.com/octokit/webhooks.js) in [Protobot](https://github.com/probot/probot)\n* [v12.3.3](https://github.com/probot/probot/releases/tag/v12.3.3)\n\n\n### Workarounds\nIt is recommend that all users upgrade to the latest version of  [octokit/webhooks.js](https://github.com/octokit/webhooks.js) or use one of the updated back ported versions.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@octokit/webhooks"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.26.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@octokit/webhooks"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0"
      }, {
        "fixed" : "10.9.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@octokit/webhooks"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0"
      }, {
        "fixed" : "11.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@octokit/webhooks"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "12.0.0"
      }, {
        "fixed" : "12.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@octokit/app"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "14.0.1"
      }, {
        "fixed" : "14.0.2"
      } ]
    } ],
    "versions" : [ "14.0.1" ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "octokit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "probot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "12.3.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/octokit/webhooks.js/security/advisories/GHSA-pwfr-8pq7-x9qv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50728"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/octokit/app.js/releases/tag/v14.0.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/octokit/octokit.js/releases/tag/v3.1.2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/octokit/webhooks.js"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/octokit/webhooks.js/releases/tag/v10.9.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/octokit/webhooks.js/releases/tag/v11.1.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/octokit/webhooks.js/releases/tag/v12.0.4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/octokit/webhooks.js/releases/tag/v9.26.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/probot/probot/releases/tag/v12.3.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-755" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-16T00:52:19Z",
    "nvd_published_at" : "2023-12-15T22:15:07Z"
  }
}