CVE-2026-40942: Dsf bpe process api v2 Data Sharing Framework Has An Vulnerability
MODERATECVE-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.
CVE-2026-40942 at a Glance
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.
<dependency>
<groupId>dev.dsf</groupId>
<artifactId>dsf-bpe-process-api-v2</artifactId>
<version>Latest secure release</version>
</dependency>
<dependency>
<groupId>dev.dsf</groupId>
<artifactId>dsf-bpe-server</artifactId>
<version>Latest secure release</version>
</dependency>
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
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?
Which Dsf bpe process api v2 versions are affected?
What version fixes CVE-2026-40942?
Is dsf-bpe-process-api-v2 affected?
Is dsf-bpe-server affected?
What CWE is associated with CVE-2026-40942?
How can I check Maven dependencies for CVE-2026-40942?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}