From d54bfa4292d4b00d2cb55b39d93815b410f5f5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9EULKA=C4=9EAN=20MAMAK?= Date: Wed, 26 Aug 2026 16:53:28 +0300 Subject: [PATCH] Improve GHSA-6wvw-vrw4-363w --- .../08/GHSA-6wvw-vrw4-363w/GHSA-6wvw-vrw4-363w.json | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/advisories/github-reviewed/2026/08/GHSA-6wvw-vrw4-363w/GHSA-6wvw-vrw4-363w.json b/advisories/github-reviewed/2026/08/GHSA-6wvw-vrw4-363w/GHSA-6wvw-vrw4-363w.json index c1a7d0587ea..7c136decef9 100644 --- a/advisories/github-reviewed/2026/08/GHSA-6wvw-vrw4-363w/GHSA-6wvw-vrw4-363w.json +++ b/advisories/github-reviewed/2026/08/GHSA-6wvw-vrw4-363w/GHSA-6wvw-vrw4-363w.json @@ -1,13 +1,13 @@ { "schema_version": "1.4.0", "id": "GHSA-6wvw-vrw4-363w", - "modified": "2026-08-20T18:35:41Z", + "modified": "2026-08-20T18:36:01Z", "published": "2026-08-20T18:35:41Z", "aliases": [ "CVE-2026-54156" ], "summary": "node-opcua: Unbounded nonce cache enables unauthenticated heap exhaustion DoS", - "details": "**Summary**\nA process-global nonce cache with no eviction policy allows an unauthenticated remote attacker to exhaust server heap memory by repeatedly opening sessions, causing the node-opcua server process to crash.\n\n**Affected versions:** <= 2.165.0\n**Tested version:** 2.165.0\n**CVSS Score:** 7.5 (High)\n**CVSS Vector:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H\n**CWE:** CWE-770 Allocation of Resources Without Limits or Throttling\n\n---\n\n**Root Cause**\n\nIn `packages/node-opcua-secure-channel/source/server/server_secure_channel_layer.ts` at line 156, `g_alreadyUsedNonce` is a process-global object used to track previously seen nonces for replay detection. Entries are added on every `OpenSecureChannelRequest` and every `CreateSession` request but are never removed or expired.\n\nAn unauthenticated attacker can exploit the `CreateSession` path (which requires no certificate) to accumulate nonce entries indefinitely. Even with `maxSessions=10` limiting concurrent sessions, nonces persist after session expiry, allowing slow but reliable heap exhaustion across repeated connection cycles.\n\n---\n\n**Measured Impact**\n\nDynamically confirmed heap growth:\n- 5,000 unique nonces → +1.23 MB resident heap, no eviction after explicit GC\n- Projected: 10^6 nonces → ~246 MB resident heap\n- Achievable OOM on default Node.js heap limits\n\n---\n\n**Suggested Fix**\n\nAdd a TTL-based eviction policy to `g_alreadyUsedNonce`. Nonces should be expired after the maximum session timeout (or a reasonable fixed window, e.g. 1 hour). A Map with timestamp entries and periodic cleanup is sufficient.\n\n---\n\nI am following a 90-day responsible disclosure policy. I am happy to provide additional technical details under embargo. Please confirm receipt at your earliest convenience.\n\nReporter: Stanley Tobias\nDiscovery date: 2026-03-23", + "details": "**Summary**\nA process-global nonce cache with no eviction policy allows an unauthenticated remote attacker to exhaust server heap memory by repeatedly opening sessions, causing the node-opcua server process to crash.\n\n**Affected versions:** < 2.166.0\n**Tested version:** 2.165.0\n**CVSS Score:** 7.5 (High)\n**CVSS Vector:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H\n**CWE:** CWE-770 Allocation of Resources Without Limits or Throttling\n\n---\n\n**Root Cause**\n\nIn `packages/node-opcua-secure-channel/source/server/server_secure_channel_layer.ts` at line 156, `g_alreadyUsedNonce` is a process-global object used to track previously seen nonces for replay detection. Entries are added on every `OpenSecureChannelRequest` and every `CreateSession` request but are never removed or expired.\n\nAn unauthenticated attacker can exploit the `CreateSession` path (which requires no certificate) to accumulate nonce entries indefinitely. Even with `maxSessions=10` limiting concurrent sessions, nonces persist after session expiry, allowing slow but reliable heap exhaustion across repeated connection cycles.\n\n---\n\n**Measured Impact**\n\nDynamically confirmed heap growth:\n- 5,000 unique nonces → +1.23 MB resident heap, no eviction after explicit GC\n- Projected: 10^6 nonces → ~246 MB resident heap\n- Achievable OOM on default Node.js heap limits\n\n---\n\n**Suggested Fix**\n\nAdd a TTL-based eviction policy to `g_alreadyUsedNonce`. Nonces should be expired after the maximum session timeout (or a reasonable fixed window, e.g. 1 hour). A Map with timestamp entries and periodic cleanup is sufficient.\n\n---\n\nI am following a 90-day responsible disclosure policy. I am happy to provide additional technical details under embargo. Please confirm receipt at your earliest convenience.\n\nReporter: Stanley Tobias\nDiscovery date: 2026-03-23", "severity": [ { "type": "CVSS_V3", @@ -28,14 +28,11 @@ "introduced": "0" }, { - "fixed": "2.168.0" + "fixed": "2.166.0" } ] } - ], - "database_specific": { - "last_known_affected_version_range": "<= 2.165.0" - } + ] } ], "references": [