CVE-2024-40430: Withdrawn SFTPGo's JWT Implmentation Lacks Certain Vulnerability

MODERATE
Advisory Identifier: GHSA-x72p-g37q-4xr9
CVSS 6.5
CWE-639 CWE-323
Published
Advisory Summary

CVE-2024-40430 is a MODERATE (CVSS 6.5) sftpgo's jwt implmentation lacks certain vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Withdrawn libraries in the Go ecosystem. The issue involves sftpgo's jwt implmentation lacks certain security measures. Remediation is available in the latest vendor maintenance releases.

CVE-2024-40430 at a Glance

CVE Identifier CVE-2024-40430
GHSA Identifier GHSA-x72p-g37q-4xr9
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product Withdrawn
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix CVE-2024-40430

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

github.com/drakkan/sftpgo/v2 fixed: Latest secure release
Upgrade github.com/drakkan/sftpgo/v2 to Latest secure release
Verify Direct and Transitive Dependencies

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

inspect dependencies for github.com/drakkan/sftpgo/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-40430, inspect your project dependencies for Withdrawn:

inspect dependencies for github.com/drakkan/sftpgo/v2

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In Withdrawn, 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

Withdrawn: The attack vector described in the backing report required that an attacker gain access to a user's session cookie. By gaining access to the session cookie the attacker is for all intents and purposes the valid user and any access to user data would be expected. ~In SFTPGo 2.6.2, the JWT implementation lacks certain security measures, such as using JWT ID (JTI) claims, nonces, and proper expiration and invalidation mechanisms.~

CVE-2024-40430 Affected Withdrawn Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/drakkan/sftpgo/v2
Go
≤ 2.6.2

References

Frequently Asked Questions

What is CVE-2024-40430?
CVE-2024-40430 is a security vulnerability in Withdrawn involving SFTPGo's JWT implmentation lacks certain security measures under CWE-639: Authorization Bypass Through User-Controlled Key.
Which Withdrawn versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/drakkan/sftpgo/v2.
What version fixes CVE-2024-40430?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/drakkan/sftpgo/v2 affected?
Yes, github.com/drakkan/sftpgo/v2 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-40430?
CVE-2024-40430 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2024-40430?
CVE-2024-40430 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check Go dependencies for CVE-2024-40430?
Run the dependency tree command: 'inspect dependencies for github.com/drakkan/sftpgo/v2'. 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-x72p-g37q-4xr9",
  "modified" : "2024-07-31T18:42:56Z",
  "published" : "2024-07-22T09:31:55Z",
  "withdrawn" : "2024-07-31T18:42:56Z",
  "aliases" : [ "CVE-2024-40430" ],
  "summary" : "Withdrawn: SFTPGo's JWT implmentation lacks certain security measures",
  "details" : "Withdrawn:\nThe attack vector described in the backing report required that an attacker gain access to a user's session cookie. By gaining access to the session cookie the attacker is for all intents and purposes the valid user and any access to user data would be expected.\n\n~In SFTPGo 2.6.2, the JWT implementation lacks certain security measures, such as using JWT ID (JTI) claims, nonces, and proper expiration and invalidation mechanisms.~",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/drakkan/sftpgo/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.6.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-40430"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/advisory-database/pull/4645"
  }, {
    "type" : "WEB",
    "url" : "https://alexsecurity.rocks/posts/cve-2024-40430"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/drakkan/sftpgo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-323", "CWE-639" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-22T18:46:59Z",
    "nvd_published_at" : "2024-07-22T07:15:02Z"
  }
}