CVE-2026-34240: Jose Jose Vulnerable To Untrusted JWK Vulnerability

HIGH
Advisory Identifier: GHSA-vm9r-h74p-hg97
CVSS 7.5
CWE-347
Published
Advisory Summary

CVE-2026-34240 is a HIGH (CVSS 7.5) jose vulnerable to untrusted jwk vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Jose libraries in the Pub ecosystem. The issue involves jose vulnerable to untrusted jwk header key acceptance during signature verification. Remediation is available by upgrading affected packages to version 0.3.5+1.

CVE-2026-34240 at a Glance

CVE Identifier CVE-2026-34240
GHSA Identifier GHSA-vm9r-h74p-hg97
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Jose
Package Ecosystem Pub
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:H/A:N).

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 High (I:H)
Availability None (A:N)

How to Fix CVE-2026-34240

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

jose fixed: 0.3.5+1
Upgrade jose to 0.3.5+1
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 jose

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-34240, inspect your project dependencies for Jose:

inspect dependencies for jose

Analyze the terminal output to locate any version of Jose in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.5+1), 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-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Jose, 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 A vulnerability in `jose` versions up to and including `0.3.5` could allow an unauthenticated, remote attacker to forge valid JWS/JWT tokens by using a key embedded in the JOSE header (`jwk`). The vulnerability exists because key selection could treat header-provided `jwk` as a verification candidate even when that key was not present in the trusted key store. Since JOSE headers are untrusted input, an attacker could exploit this by creating a token payload, embedding an attacker-controlled public key in the header, and signing with the matching private key. Applications using affected versions for token verification are impacted. ### Patches Upgrade to `0.3.5+1` or later. ### Workarounds Reject tokens where header `jwk` is present unless that `jwk` matches a key already present in the application's trusted key store. ### Resources Fix commit: [fix: improved key resolution in JsonWebKeyStore](https://github.com/appsup-dart/jose/commit/b07799aac1f56a9a21483feac026272aab30cc5d)

CVE-2026-34240 Affected Jose Versions

1 component(s)
Fixed Versions:
0.3.5+1
Product / Package Ecosystem Affected Versions Fixed Version
jose
Pub
< 0.3.5+1
0.3.5+1

References

Frequently Asked Questions

What is CVE-2026-34240?
CVE-2026-34240 is a security vulnerability in Jose involving jose vulnerable to untrusted JWK header key acceptance during signature verification under CWE-347: Improper Verification of Cryptographic Signature.
Which Jose versions are affected?
Affected versions include releases prior to 0.3.5+1 across affected packages: jose.
What version fixes CVE-2026-34240?
Upgrading to 0.3.5+1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jose affected?
Yes, jose is affected in releases prior to 0.3.5+1. Upgrade your dependency to 0.3.5+1 or later.
What is the CVSS score of CVE-2026-34240?
CVE-2026-34240 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2026-34240?
CVE-2026-34240 is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check Pub dependencies for CVE-2026-34240?
Run the dependency tree command: 'inspect dependencies for jose'. 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-vm9r-h74p-hg97",
  "modified" : "2026-03-31T23:09:16Z",
  "published" : "2026-03-31T23:09:16Z",
  "aliases" : [ "CVE-2026-34240" ],
  "summary" : "jose vulnerable to untrusted JWK header key acceptance during signature verification",
  "details" : "### Impact\n\nA vulnerability in `jose` versions up to and including `0.3.5` could allow an unauthenticated, remote attacker to forge valid JWS/JWT tokens by using a key embedded in the JOSE header (`jwk`).  \n\nThe vulnerability exists because key selection could treat header-provided `jwk` as a verification candidate even when that key was not present in the trusted key store. Since JOSE headers are untrusted input, an attacker could exploit this by creating a token payload, embedding an attacker-controlled public key in the header, and signing with the matching private key.  \n\nApplications using affected versions for token verification are impacted.\n\n### Patches\n\nUpgrade to `0.3.5+1` or later.\n\n### Workarounds\n\nReject tokens where header `jwk` is present unless that `jwk` matches a key already present in the application's trusted key store.\n\n### Resources\n\nFix commit: [fix: improved key resolution in JsonWebKeyStore](https://github.com/appsup-dart/jose/commit/b07799aac1f56a9a21483feac026272aab30cc5d)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Pub",
      "name" : "jose"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.5+1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.3.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/appsup-dart/jose/security/advisories/GHSA-vm9r-h74p-hg97"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34240"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/appsup-dart/jose/commit/b07799aac1f56a9a21483feac026272aab30cc5d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/appsup-dart/jose"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-31T23:09:16Z",
    "nvd_published_at" : "2026-03-31T16:16:33Z"
  }
}