Vulnerabilities in pkg:maven/dev.dsf/dsf-bpe-process-api-v2

PACKAGE
Advisory Identifier: GHSA-xmj9-7625-f634
Advisory Summary

CVE-2026-40942 is a MODERATE data sharing framework has an vulnerability (CWE-670: Always-Incorrect Control Flow Implementation) affecting Dsf bpe process api v2 libraries in the Maven ecosystem. The issue involves data sharing framework has an inverted time comparison in oidc jwks and token cache. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/dev.dsf/dsf-bpe-process-api-v2

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/dev.dsf/dsf-bpe-process-api-v2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-xmj9-7625-f634 CVE-2026-40942 MODERATE Data Sharing Framework has an Inverted Time Comparison in OIDC JWKS and Token Cache

CVE-2026-40942 at a Glance

CVE Identifier CVE-2026-40942
GHSA Identifier GHSA-xmj9-7625-f634
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-670: Always-Incorrect Control Flow Implementation
Affected Product Dsf bpe process api v2
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2026-40942

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

dev.dsf:dsf-bpe-process-api-v2 fixed: Latest secure release
<dependency>
    <groupId>dev.dsf</groupId>
    <artifactId>dsf-bpe-process-api-v2</artifactId>
    <version>Latest secure release</version>
</dependency>
dev.dsf:dsf-bpe-server fixed: Latest secure release
<dependency>
    <groupId>dev.dsf</groupId>
    <artifactId>dsf-bpe-server</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

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

mvn dependency:tree -Dincludes=dev.dsf

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-40942, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=dev.dsf

Analyze the terminal output to locate any version of Dsf bpe process api v2 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: The mvn dependency:tree -Dincludes=dev.dsf command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-670: Always-Incorrect Control Flow Implementation, where the code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated. In Dsf bpe process api v2, 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

### Affected Components - DSF FHIR Server with enabled [bearer-token authentication](https://dsf.dev/operations/v2.1.0/fhir/oidc.html) or [back-channel logout](https://dsf.dev/operations/v2.1.0/fhir/oidc.html). - DSF BPE Server with enabled [bearer-token authentication](https://dsf.dev/operations/v2.1.0/bpe/oidc.html) or [back-channel logout](https://dsf.dev/operations/v2.1.0/bpe/oidc.html). - DSF BPE Server API v2 process plugins using [FHIR client connections](https://dsf.dev/operations/v2.1.0/bpe/fhir-client-connections.html) with configured OIDC authentication. ### Summary - The OIDC JWKS and Metadata Document caches used an inverted time comparison (`isBefore` instead of `isAfter`), causing the cache to **never return cached values**. Every incoming request triggered a fresh HTTP fetch of the OIDC Metadata Document and JWKS keys from the OIDC provider. - The OIDC token cache for the [FHIR client connections](https://dsf.dev/operations/v2.1.0/bpe/fhir-client-connections.html) used an inverted time comparison (`isBefore` instead of `isAfter`), causing the cache to **never invalidate**. Every incoming request returned the same OIDC token even if expired. ### Impact - **Performance:** Every OIDC-authenticated request added network round-trips to the OIDC provider, increasing latency - **Reliability:** Cached OIDC tokens become unusable after expiration and can only be invalidated by restart of the BPE. If the OIDC provider is temporarily unreachable, all requests fail immediately instead of using cached keys - **Load:** Unnecessary load on the OIDC provider, potentially causing rate limiting ### Fix (commits 31c2e974d, d3ca59b4d) - Fixed cache timeout comparison from `isBefore` to `isAfter` in `BaseOidcClientWithCache` (configuration and JWKS caches) and `OidcClientWithCache` (configuration, JWKS, and access token caches) - Added configurable cache timeouts via `dev.dsf.server.auth.oidc.provider.client.cache.timeout.configuration.resource` and `dev.dsf.server.auth.oidc.provider.client.cache.timeout.jwks.resource` (default: `PT1H`)

CVE-2026-40942 Affected Dsf bpe process api v2 Versions

2 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
dev.dsf:dsf-bpe-process-api-v2
Maven
dev.dsf:dsf-bpe-server
Maven

References

Frequently Asked Questions

What is CVE-2026-40942?
CVE-2026-40942 is a security vulnerability in Dsf bpe process api v2 involving Data Sharing Framework has an Inverted Time Comparison in OIDC JWKS and Token Cache under CWE-670: Always-Incorrect Control Flow Implementation.
Which Dsf bpe process api v2 versions are affected?
Affected versions include releases prior to current release patches across affected packages: dev.dsf:dsf-bpe-process-api-v2, dev.dsf:dsf-bpe-server.
What version fixes CVE-2026-40942?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is dsf-bpe-process-api-v2 affected?
Yes, dev.dsf:dsf-bpe-process-api-v2 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is dsf-bpe-server affected?
Yes, dev.dsf:dsf-bpe-server is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2026-40942?
CVE-2026-40942 is classified under CWE-670: Always-Incorrect Control Flow Implementation (The code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated.).
How can I check Maven dependencies for CVE-2026-40942?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=dev.dsf'. 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-xmj9-7625-f634",
  "modified" : "2026-04-24T20:39:38Z",
  "published" : "2026-04-15T19:19:50Z",
  "aliases" : [ "CVE-2026-40942" ],
  "summary" : "Data Sharing Framework has an Inverted Time Comparison in OIDC JWKS and Token Cache",
  "details" : "### Affected Components\n- DSF FHIR Server with enabled [bearer-token authentication](https://dsf.dev/operations/v2.1.0/fhir/oidc.html) or [back-channel logout](https://dsf.dev/operations/v2.1.0/fhir/oidc.html).\n- DSF BPE Server with enabled [bearer-token authentication](https://dsf.dev/operations/v2.1.0/bpe/oidc.html) or [back-channel logout](https://dsf.dev/operations/v2.1.0/bpe/oidc.html).\n- DSF BPE Server API v2 process plugins using [FHIR client connections](https://dsf.dev/operations/v2.1.0/bpe/fhir-client-connections.html) with configured OIDC authentication.\n\n### Summary\n- The OIDC JWKS and Metadata Document caches used an inverted time comparison (`isBefore` instead of `isAfter`), causing the cache to **never return cached values**. Every incoming request triggered a fresh HTTP fetch of the OIDC Metadata Document and JWKS keys from the OIDC provider.\n- The OIDC token cache for the [FHIR client connections](https://dsf.dev/operations/v2.1.0/bpe/fhir-client-connections.html) used an inverted time comparison (`isBefore` instead of `isAfter`), causing the cache to **never invalidate**. Every incoming request returned the same OIDC token even if expired.\n\n### Impact\n- **Performance:** Every OIDC-authenticated request added network round-trips to the OIDC provider, increasing latency\n- **Reliability:** Cached OIDC tokens become unusable after expiration and can only be invalidated by restart of the BPE. \n If the OIDC provider is temporarily unreachable, all requests fail immediately instead of using cached keys\n- **Load:** Unnecessary load on the OIDC provider, potentially causing rate limiting\n\n### Fix (commits 31c2e974d, d3ca59b4d)\n- Fixed cache timeout comparison from `isBefore` to `isAfter` in `BaseOidcClientWithCache` (configuration and JWKS caches) and `OidcClientWithCache` (configuration, JWKS, and access token caches)\n- Added configurable cache timeouts via `dev.dsf.server.auth.oidc.provider.client.cache.timeout.configuration.resource` and `dev.dsf.server.auth.oidc.provider.client.cache.timeout.jwks.resource` (default: `PT1H`)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "dev.dsf:dsf-bpe-process-api-v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 2.1.0"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "dev.dsf:dsf-bpe-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 2.1.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/datasharingframework/dsf/security/advisories/GHSA-xmj9-7625-f634"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40942"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/datasharingframework/dsf/commit/31c2e974dfd4351756104ee8c53dbcd666192fef"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/datasharingframework/dsf/commit/d3ca59b4daccde16a006fedeccce28fd1f826908"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/datasharingframework/dsf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-670" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-15T19:19:50Z",
    "nvd_published_at" : "2026-04-21T22:16:19Z"
  }
}