CVE-2025-27144: Github.com/go jose/go jose/v4 Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-c6gw-w398-hv78
CWE-400 CWE-770
Published
Advisory Summary

CVE-2025-27144 is a MODERATE denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Github.com/go jose/go jose/v4 libraries in the Go ecosystem. The issue involves dos in go-jose parsing. Remediation is available by upgrading affected packages to version 4.0.5, 3.0.4.

CVE-2025-27144 at a Glance

CVE Identifier CVE-2025-27144
GHSA Identifier GHSA-c6gw-w398-hv78
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Github.com/go jose/go jose/v4
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-27144

To remediate this vulnerability, upgrade all affected Github.com/go jose/go jose/v4 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/go-jose/go-jose/v4 fixed: 4.0.5
Upgrade github.com/go-jose/go-jose/v4 to 4.0.5
github.com/go-jose/go-jose/v3 fixed: 3.0.4
Upgrade github.com/go-jose/go-jose/v3 to 3.0.4
github.com/go-jose/go-jose fixed: 3.0.4
Upgrade github.com/go-jose/go-jose to 3.0.4
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/go-jose/go-jose/v4

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-27144, inspect your project dependencies for Github.com/go jose/go jose/v4:

inspect dependencies for github.com/go-jose/go-jose/v4

Analyze the terminal output to locate any version of Github.com/go jose/go jose/v4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.5), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Github.com/go jose/go jose/v4, 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 When parsing compact JWS or JWE input, go-jose could use excessive memory. The code used strings.Split(token, ".") to split JWT tokens, which is vulnerable to excessive memory consumption when processing maliciously crafted tokens with a large number of '.' characters. An attacker could exploit this by sending numerous malformed tokens, leading to memory exhaustion and a Denial of Service. ### Patches Version 4.0.5 fixes this issue ### Workarounds Applications could pre-validate payloads passed to go-jose do not contain an excessive number of '.' characters. ### References This is the same sort of issue as in the golang.org/x/oauth2/jws package as CVE-2025-22868 and Go issue https://go.dev/issue/71490.

CVE-2025-27144 Affected Github.com/go jose/go jose/v4 Versions

3 component(s)
Fixed Versions:
4.0.53.0.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/go-jose/go-jose/v4
Go
< 4.0.5
4.0.5
github.com/go-jose/go-jose/v3
Go
< 3.0.4
3.0.4
github.com/go-jose/go-jose
Go
< 3.0.4
3.0.4

References

Frequently Asked Questions

What is CVE-2025-27144?
CVE-2025-27144 is a security vulnerability in Github.com/go jose/go jose/v4 involving DoS in go-jose Parsing under CWE-400: Uncontrolled Resource Consumption.
Which Github.com/go jose/go jose/v4 versions are affected?
Affected versions include releases prior to 4.0.5, 3.0.4 across affected packages: github.com/go-jose/go-jose/v4, github.com/go-jose/go-jose/v3, github.com/go-jose/go-jose.
What version fixes CVE-2025-27144?
Upgrading to 4.0.5, 3.0.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/go-jose/go-jose/v4 affected?
Yes, github.com/go-jose/go-jose/v4 is affected in releases prior to 4.0.5. Upgrade your dependency to 4.0.5 or later.
Is github.com/go-jose/go-jose/v3 affected?
Yes, github.com/go-jose/go-jose/v3 is affected in releases prior to 3.0.4. Upgrade your dependency to 3.0.4 or later.
What CWE is associated with CVE-2025-27144?
CVE-2025-27144 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Go dependencies for CVE-2025-27144?
Run the dependency tree command: 'inspect dependencies for github.com/go-jose/go-jose/v4'. 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-c6gw-w398-hv78",
  "modified" : "2025-02-26T22:16:36Z",
  "published" : "2025-02-24T22:49:19Z",
  "aliases" : [ "CVE-2025-27144" ],
  "summary" : "DoS in go-jose Parsing",
  "details" : "### Impact\nWhen parsing compact JWS or JWE input, go-jose could use excessive memory. The code used strings.Split(token, \".\") to split JWT tokens, which is vulnerable to excessive memory consumption when processing maliciously crafted tokens with a large number of '.' characters.  An attacker could exploit this by sending numerous malformed tokens, leading to memory exhaustion and a Denial of Service.\n\n### Patches\nVersion 4.0.5 fixes this issue\n\n### Workarounds\nApplications could pre-validate payloads passed to go-jose do not contain an excessive number of '.' characters.\n\n### References\nThis is the same sort of issue as in the golang.org/x/oauth2/jws package as CVE-2025-22868 and Go issue https://go.dev/issue/71490.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-jose/go-jose/v4"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-jose/go-jose/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-jose/go-jose"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/go-jose/go-jose/security/advisories/GHSA-c6gw-w398-hv78"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-27144"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/golang/go/issues/71490"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-jose/go-jose/commit/99b346cec4e86d102284642c5dcbe9bb0cacfc22"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/go-jose/go-jose"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-jose/go-jose/releases/tag/v4.0.5"
  }, {
    "type" : "WEB",
    "url" : "https://go.dev/issue/71490"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-02-24T22:49:19Z",
    "nvd_published_at" : "2025-02-24T23:15:11Z"
  }
}