{"id":"CVE-2026-40939","aliases":["GHSA-gj7p-595x-qwf5"],"url":"https://o3.security/vulnerability/CVE-2026-40939","summary":"DSF: Missing Session Timeout for OIDC Sessions","details":"### Affected Components\nDSF FHIR Server with enabled [OIDC authentication](https://dsf.dev/operations/v2.1.0/fhir/oidc.html).\nDSF BPE Server with enabled [OIDC authentication](https://dsf.dev/operations/v2.1.0/bpe/oidc.html).\n\n### Summary\nOIDC-authenticated sessions had no configured maximum inactivity timeout. Sessions persisted indefinitely after login, even after the OIDC access token expired.\n\n### Impact\nIf a user logs in via OIDC and leaves their browser without explicitly logging out, the session remains valid indefinitely. Another person using the same browser can access the DSF UI with the previous user's permissions. This is a realistic threat in hospital environments with shared workstations.\n\nOnly affects OIDC browser sessions, not relevant for mTLS machine-to-machine communication.\n\n### Fix (commits f4ecb00, 7d25fea)\n- Added configurable session timeout via `dev.dsf.server.auth.oidc.session.timeout` (default: `PT30M`).\n- Enabled `logoutWhenIdTokenIsExpired(true)` in OpenID configuration to tie session lifetime to token lifetime.\n- Websocket sessions are now closed with `VIOLATED_POLICY` when credentials expire, prevents stale websocket connections from continuing to receive events after session timeout.","published":"2026-04-21T21:07:10.503Z","modified":"2026-08-12T16:24:09.549677Z","cvss":null,"epss":{"score":0.00154,"percentile":0.04939,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Maven","name":"dev.dsf:dsf-common-jetty","fixedVersion":null},{"ecosystem":"Maven","name":"dev.dsf:dsf-fhir-server","fixedVersion":null},{"ecosystem":"Maven","name":"dev.dsf:dsf-bpe-server","fixedVersion":null}],"fix":{"url":"https://github.com/datasharingframework/dsf/commit/f4ecb002f7d12642f92da6b79371ed367d0140e7","label":"datasharingframework/dsf@f4ecb00"},"references":[{"type":"WEB","url":"https://dsf.dev/operations/v2.1.0/bpe/oidc.html"},{"type":"WEB","url":"https://dsf.dev/operations/v2.1.0/fhir/oidc.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40939.json"},{"type":"ADVISORY","url":"https://github.com/datasharingframework/dsf/security/advisories/GHSA-gj7p-595x-qwf5"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40939"},{"type":"FIX","url":"https://github.com/datasharingframework/dsf/commit/f4ecb002f7d12642f92da6b79371ed367d0140e7"},{"type":"WEB","url":"https://github.com/datasharingframework/dsf/commit/7d25feafb83d66cb59985ac88568b67d937b1937"},{"type":"PACKAGE","url":"https://github.com/datasharingframework/dsf"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T16:24:09.549677Z"}}