CWE-362
Allowed-with-ReviewConcurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Abstraction: Class · Status: Draft
The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.
2903 vulnerabilities reference this CWE, most recent first.
GHSA-52RJ-C24H-M8WR
Vulnerability from github – Published: 2025-11-11 18:30 – Updated: 2025-11-11 18:30Concurrent execution using shared resource with improper synchronization ('race condition') in Windows DirectX allows an authorized attacker to elevate privileges locally.
{
"affected": [],
"aliases": [
"CVE-2025-59506"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-11-11T18:15:36Z",
"severity": "HIGH"
},
"details": "Concurrent execution using shared resource with improper synchronization (\u0027race condition\u0027) in Windows DirectX allows an authorized attacker to elevate privileges locally.",
"id": "GHSA-52rj-c24h-m8wr",
"modified": "2025-11-11T18:30:20Z",
"published": "2025-11-11T18:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-59506"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-59506"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-5356-67PR-8FFV
Vulnerability from github – Published: 2023-10-10 18:31 – Updated: 2024-04-04 08:32Windows Runtime Remote Code Execution Vulnerability
{
"affected": [],
"aliases": [
"CVE-2023-36902"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-10-10T18:15:17Z",
"severity": "HIGH"
},
"details": "Windows Runtime Remote Code Execution Vulnerability",
"id": "GHSA-5356-67pr-8ffv",
"modified": "2024-04-04T08:32:42Z",
"published": "2023-10-10T18:31:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-36902"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-36902"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-53C5-74PX-FWCH
Vulnerability from github – Published: 2025-05-01 15:31 – Updated: 2025-11-05 18:14In the Linux kernel, the following vulnerability has been resolved:
bus: mhi: host: Fix race between unprepare and queue_buf
A client driver may use mhi_unprepare_from_transfer() to quiesce incoming data during the client driver's tear down. The client driver might also be processing data at the same time, resulting in a call to mhi_queue_buf() which will invoke mhi_gen_tre(). If mhi_gen_tre() runs after mhi_unprepare_from_transfer() has torn down the channel, a panic will occur due to an invalid dereference leading to a page fault.
This occurs because mhi_gen_tre() does not verify the channel state after locking it. Fix this by having mhi_gen_tre() confirm the channel state is valid, or return error to avoid accessing deinitialized data.
[mani: added stable tag]
{
"affected": [],
"aliases": [
"CVE-2025-23151"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-05-01T13:15:51Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nbus: mhi: host: Fix race between unprepare and queue_buf\n\nA client driver may use mhi_unprepare_from_transfer() to quiesce\nincoming data during the client driver\u0027s tear down. The client driver\nmight also be processing data at the same time, resulting in a call to\nmhi_queue_buf() which will invoke mhi_gen_tre(). If mhi_gen_tre() runs\nafter mhi_unprepare_from_transfer() has torn down the channel, a panic\nwill occur due to an invalid dereference leading to a page fault.\n\nThis occurs because mhi_gen_tre() does not verify the channel state\nafter locking it. Fix this by having mhi_gen_tre() confirm the channel\nstate is valid, or return error to avoid accessing deinitialized data.\n\n[mani: added stable tag]",
"id": "GHSA-53c5-74px-fwch",
"modified": "2025-11-05T18:14:25Z",
"published": "2025-05-01T15:31:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-23151"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/0686a818d77a431fc3ba2fab4b46bbb04e8c9380"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/178e5657c8fd285125cc6743a81b513bce099760"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/3e7ecf181cbdde9753204ada3883ca1704d8702b"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/5f084993c90d9d0b4a52a349ede5120f992a7ca1"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/899d0353ea69681f474b6bc9de32c663b89672da"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a77955f7704b2a00385e232cbcc1cb06b5c7a425"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/ee1fce83ed56450087309b9b74ad9bcb2b010fa6"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-53CP-W2XF-R5R3
Vulnerability from github – Published: 2026-04-14 18:30 – Updated: 2026-04-14 18:30Concurrent execution using shared resource with improper synchronization ('race condition') in Windows Push Notifications allows an authorized attacker to elevate privileges locally.
{
"affected": [],
"aliases": [
"CVE-2026-32158"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-04-14T18:17:17Z",
"severity": "HIGH"
},
"details": "Concurrent execution using shared resource with improper synchronization (\u0027race condition\u0027) in Windows Push Notifications allows an authorized attacker to elevate privileges locally.",
"id": "GHSA-53cp-w2xf-r5r3",
"modified": "2026-04-14T18:30:41Z",
"published": "2026-04-14T18:30:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32158"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-32158"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-53CW-7857-2J7G
Vulnerability from github – Published: 2022-05-02 03:30 – Updated: 2024-02-15 21:31The inode double locking code in fs/ocfs2/file.c in the Linux kernel 2.6.30 before 2.6.30-rc3, 2.6.27 before 2.6.27.24, 2.6.29 before 2.6.29.4, and possibly other versions down to 2.6.19 allows local users to cause a denial of service (prevention of file creation and removal) via a series of splice system calls that trigger a deadlock between the generic_file_splice_write, splice_from_pipe, and ocfs2_file_splice_write functions.
{
"affected": [],
"aliases": [
"CVE-2009-1961"
],
"database_specific": {
"cwe_ids": [
"CWE-362",
"CWE-667"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-06-08T01:00:00Z",
"severity": "LOW"
},
"details": "The inode double locking code in fs/ocfs2/file.c in the Linux kernel 2.6.30 before 2.6.30-rc3, 2.6.27 before 2.6.27.24, 2.6.29 before 2.6.29.4, and possibly other versions down to 2.6.19 allows local users to cause a denial of service (prevention of file creation and removal) via a series of splice system calls that trigger a deadlock between the generic_file_splice_write, splice_from_pipe, and ocfs2_file_splice_write functions.",
"id": "GHSA-53cw-7857-2j7g",
"modified": "2024-02-15T21:31:24Z",
"published": "2022-05-02T03:30:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-1961"
},
{
"type": "WEB",
"url": "http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git%3Ba=commitdiff%3Bh=7bfac9ecf0585962fe13584f5cf526d8c8e76f17"
},
{
"type": "WEB",
"url": "http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7bfac9ecf0585962fe13584f5cf526d8c8e76f17"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2009-06/msg00000.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2009-06/msg00001.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2009-07/msg00004.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35390"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35394"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35656"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35847"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36051"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1022307"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2009/dsa-1844"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2009:135"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2009:148"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2009/05/29/2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2009/05/30/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2009/06/02/2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2009/06/03/1"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2009-1157.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/35143"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/usn-793-1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-53J5-49XJ-4XHC
Vulnerability from github – Published: 2022-12-13 18:30 – Updated: 2022-12-15 06:30In TBD of TBD, there is a possible way to archive arbitrary code execution in kernel due to a race condition. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation.Product: AndroidVersions: Android SoCAndroid ID: A-254742984
{
"affected": [],
"aliases": [
"CVE-2021-39660"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-12-13T16:15:00Z",
"severity": "HIGH"
},
"details": "In TBD of TBD, there is a possible way to archive arbitrary code execution in kernel due to a race condition. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation.Product: AndroidVersions: Android SoCAndroid ID: A-254742984",
"id": "GHSA-53j5-49xj-4xhc",
"modified": "2022-12-15T06:30:30Z",
"published": "2022-12-13T18:30:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-39660"
},
{
"type": "WEB",
"url": "https://source.android.com/security/bulletin/2022-12-01"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-53QJ-R27X-693F
Vulnerability from github – Published: 2022-05-24 16:53 – Updated: 2024-04-04 01:42An issue was discovered in drivers/net/ethernet/arc/emac_main.c in the Linux kernel before 4.5. A use-after-free is caused by a race condition between the functions arc_emac_tx and arc_emac_tx_clean.
{
"affected": [],
"aliases": [
"CVE-2016-10906"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-08-19T02:15:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in drivers/net/ethernet/arc/emac_main.c in the Linux kernel before 4.5. A use-after-free is caused by a race condition between the functions arc_emac_tx and arc_emac_tx_clean.",
"id": "GHSA-53qj-r27x-693f",
"modified": "2024-04-04T01:42:00Z",
"published": "2022-05-24T16:53:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-10906"
},
{
"type": "WEB",
"url": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c278c253f3d992c6994d08aa0efb2b6806ca396f"
},
{
"type": "WEB",
"url": "https://seclists.org/bugtraq/2019/Nov/11"
},
{
"type": "WEB",
"url": "https://support.f5.com/csp/article/K01993501?utm_source=f5support\u0026amp%3Butm_medium=RSS"
},
{
"type": "WEB",
"url": "https://usn.ubuntu.com/4163-1"
},
{
"type": "WEB",
"url": "https://usn.ubuntu.com/4163-2"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/155212/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-53QP-89JC-Q338
Vulnerability from github – Published: 2026-05-08 15:31 – Updated: 2026-05-21 18:33In the Linux kernel, the following vulnerability has been resolved:
cgroup: fix race between task migration and iteration
When a task is migrated out of a css_set, cgroup_migrate_add_task() first moves it from cset->tasks to cset->mg_tasks via:
list_move_tail(&task->cg_list, &cset->mg_tasks);
If a css_task_iter currently has it->task_pos pointing to this task, css_set_move_task() calls css_task_iter_skip() to keep the iterator valid. However, since the task has already been moved to ->mg_tasks, the iterator is advanced relative to the mg_tasks list instead of the original tasks list. As a result, remaining tasks on cset->tasks, as well as tasks queued on cset->mg_tasks, can be skipped by iteration.
Fix this by calling css_set_skip_task_iters() before unlinking task->cg_list from cset->tasks. This advances all active iterators to the next task on cset->tasks, so iteration continues correctly even when a task is concurrently being migrated.
This race is hard to hit in practice without instrumentation, but it can be reproduced by artificially slowing down cgroup_procs_show(). For example, on an Android device a temporary /sys/kernel/cgroup/cgroup_test knob can be added to inject a delay into cgroup_procs_show(), and then:
1) Spawn three long-running tasks (PIDs 101, 102, 103). 2) Create a test cgroup and move the tasks into it. 3) Enable a large delay via /sys/kernel/cgroup/cgroup_test. 4) In one shell, read cgroup.procs from the test cgroup. 5) Within the delay window, in another shell migrate PID 102 by writing it to a different cgroup.procs file.
Under this setup, cgroup.procs can intermittently show only PID 101 while skipping PID 103. Once the migration completes, reading the file again shows all tasks as expected.
Note that this change does not allow removing the existing css_set_skip_task_iters() call in css_set_move_task(). The new call in cgroup_migrate_add_task() only handles iterators that are racing with migration while the task is still on cset->tasks. Iterators may also start after the task has been moved to cset->mg_tasks. If we dropped css_set_skip_task_iters() from css_set_move_task(), such iterators could keep task_pos pointing to a migrating task, causing css_task_iter_advance() to malfunction on the destination css_set, up to and including crashes or infinite loops.
The race window between migration and iteration is very small, and css_task_iter is not on a hot path. In the worst case, when an iterator is positioned on the first thread of the migrating process, cgroup_migrate_add_task() may have to skip multiple tasks via css_set_skip_task_iters(). However, this only happens when migration and iteration actually race, so the performance impact is negligible compared to the correctness fix provided here.
{
"affected": [],
"aliases": [
"CVE-2026-43439"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-08T15:16:56Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\ncgroup: fix race between task migration and iteration\n\nWhen a task is migrated out of a css_set, cgroup_migrate_add_task()\nfirst moves it from cset-\u003etasks to cset-\u003emg_tasks via:\n\n list_move_tail(\u0026task-\u003ecg_list, \u0026cset-\u003emg_tasks);\n\nIf a css_task_iter currently has it-\u003etask_pos pointing to this task,\ncss_set_move_task() calls css_task_iter_skip() to keep the iterator\nvalid. However, since the task has already been moved to -\u003emg_tasks,\nthe iterator is advanced relative to the mg_tasks list instead of the\noriginal tasks list. As a result, remaining tasks on cset-\u003etasks, as\nwell as tasks queued on cset-\u003emg_tasks, can be skipped by iteration.\n\nFix this by calling css_set_skip_task_iters() before unlinking\ntask-\u003ecg_list from cset-\u003etasks. This advances all active iterators to\nthe next task on cset-\u003etasks, so iteration continues correctly even\nwhen a task is concurrently being migrated.\n\nThis race is hard to hit in practice without instrumentation, but it\ncan be reproduced by artificially slowing down cgroup_procs_show().\nFor example, on an Android device a temporary\n/sys/kernel/cgroup/cgroup_test knob can be added to inject a delay\ninto cgroup_procs_show(), and then:\n\n 1) Spawn three long-running tasks (PIDs 101, 102, 103).\n 2) Create a test cgroup and move the tasks into it.\n 3) Enable a large delay via /sys/kernel/cgroup/cgroup_test.\n 4) In one shell, read cgroup.procs from the test cgroup.\n 5) Within the delay window, in another shell migrate PID 102 by\n writing it to a different cgroup.procs file.\n\nUnder this setup, cgroup.procs can intermittently show only PID 101\nwhile skipping PID 103. Once the migration completes, reading the\nfile again shows all tasks as expected.\n\nNote that this change does not allow removing the existing\ncss_set_skip_task_iters() call in css_set_move_task(). The new call\nin cgroup_migrate_add_task() only handles iterators that are racing\nwith migration while the task is still on cset-\u003etasks. Iterators may\nalso start after the task has been moved to cset-\u003emg_tasks. If we\ndropped css_set_skip_task_iters() from css_set_move_task(), such\niterators could keep task_pos pointing to a migrating task, causing\ncss_task_iter_advance() to malfunction on the destination css_set,\nup to and including crashes or infinite loops.\n\nThe race window between migration and iteration is very small, and\ncss_task_iter is not on a hot path. In the worst case, when an\niterator is positioned on the first thread of the migrating process,\ncgroup_migrate_add_task() may have to skip multiple tasks via\ncss_set_skip_task_iters(). However, this only happens when migration\nand iteration actually race, so the performance impact is negligible\ncompared to the correctness fix provided here.",
"id": "GHSA-53qp-89jc-q338",
"modified": "2026-05-21T18:33:06Z",
"published": "2026-05-08T15:31:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-43439"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/3b95abab7369235a37b15eaec6e1a0b443bba7c7"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/3dfd1328c05234e8d8fa61948b2ba82680594988"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/4a9654a2b46cfdaae287fb8995f536245635e467"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/5ee01f1a7343d6a3547b6802ca2d4cdce0edacb1"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/7c85debc35e6d131bd29c64f2ae78c6ede0e55c4"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/86ceaccfdfa16dad05addb33dc206e03589bcfd1"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/9cca530c7cc1b3e02cb8fa7f80060dd4b38562ce"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/9dc76f6fc0d28d2382583715bc4ec22f28104845"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-53WG-R69P-V3R7
Vulnerability from github – Published: 2026-01-16 21:09 – Updated: 2026-01-21 16:20Summary
Originally reported as an issue #2613 but should be elevated to a security issue as the ExecutionContext is often used to pass authentication tokens from incoming requests to services loading data from backend APIs.
Details
When 2 or more parallel requests are made which trigger the same service, the context of the requests is mixed up in the service when the context is injected via @ExecutionContext()
PoC
In a new project/folder, create and install the following package.json:
{
"name": "GHSA-53wg-r69p-v3r7",
"scripts": {
"test": "jest"
},
"dependencies": {
"graphql-modules": "2.4.0"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.28.6",
"babel-plugin-parameter-decorator": "^1.0.16",
"jest": "^29.7.0",
"reflect-metadata": "^0.2.2"
}
}
with:
npm i
configure babel.config.json using:
{
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
"babel-plugin-parameter-decorator",
"@babel/plugin-proposal-class-properties"
]
}
then write the following test GHSA-53wg-r69p-v3r7.spec.ts:
require("reflect-metadata");
const {
createApplication,
createModule,
Injectable,
Scope,
ExecutionContext,
gql,
testkit,
} = require("graphql-modules");
test("accessing a singleton provider context during another asynchronous execution", async () => {
@Injectable({ scope: Scope.Singleton })
class IdentifierProvider {
@ExecutionContext()
context;
getId() {
return this.context.identifier;
}
}
const { promise: gettingBefore, resolve: gotBefore } = createDeferred();
const { promise: waitForGettingAfter, resolve: getAfter } = createDeferred();
const mod = createModule({
id: "mod",
providers: [IdentifierProvider],
typeDefs: gql`
type Query {
getAsyncIdentifiers: Identifiers!
}
type Identifiers {
before: String!
after: String!
}
`,
resolvers: {
Query: {
async getAsyncIdentifiers(_0, _1, context) {
const before = context.injector.get(IdentifierProvider).getId();
gotBefore();
await waitForGettingAfter;
const after = context.injector.get(IdentifierProvider).getId();
return { before, after };
},
},
},
});
const app = createApplication({
modules: [mod],
});
const document = gql`
{
getAsyncIdentifiers {
before
after
}
}
`;
const firstResult$ = testkit.execute(app, {
contextValue: {
identifier: "first",
},
document,
});
await gettingBefore;
const secondResult$ = testkit.execute(app, {
contextValue: {
identifier: "second",
},
document,
});
getAfter();
await expect(firstResult$).resolves.toEqual({
data: {
getAsyncIdentifiers: {
before: "first",
after: "first",
},
},
});
await expect(secondResult$).resolves.toEqual({
data: {
getAsyncIdentifiers: {
before: "second",
after: "second",
},
},
});
});
function createDeferred() {
let resolve, reject;
const promise = new Promise((res, rej) => {
resolve = res;
reject = rej;
});
return {
promise,
resolve,
reject,
};
}
and execute using:
npm test
Your project tree should look like this:
GHSA-53wg-r69p-v3r7
package.json
package-lock.json
babel.config.json
GHSA-53wg-r69p-v3r7.spec.js
Expected vs. Actual Outcome
- Expected - 1
+ Received + 1
Object {
"data": Object {
"getAsyncIdentifiers": Object {
- "after": "first",
+ "after": "second",
"before": "first",
},
},
}
Impact
Any application that uses services that inject the context using @ExecutionContext() from a singleton provider are at risk. The more traffic an application has, the higher the chance for parallel requests, the higher the risk.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "graphql-modules"
},
"ranges": [
{
"events": [
{
"introduced": "2.2.1"
},
{
"fixed": "2.4.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "graphql-modules"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.1.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-23735"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-16T21:09:08Z",
"nvd_published_at": "2026-01-16T20:15:51Z",
"severity": "HIGH"
},
"details": "### Summary\nOriginally reported as an issue #2613 but should be elevated to a security issue as the ExecutionContext is often used to pass authentication tokens from incoming requests to services loading data from backend APIs.\n\n### Details\nWhen 2 or more parallel requests are made which trigger the same service, the context of the requests is mixed up in the service when the context is injected via `@ExecutionContext()`\n\n### PoC\n\nIn a new project/folder, create and install the following `package.json`:\n\n```json\n{\n \"name\": \"GHSA-53wg-r69p-v3r7\",\n \"scripts\": {\n \"test\": \"jest\"\n },\n \"dependencies\": {\n \"graphql-modules\": \"2.4.0\"\n },\n \"devDependencies\": {\n \"@babel/plugin-proposal-class-properties\": \"^7.18.6\",\n \"@babel/plugin-proposal-decorators\": \"^7.28.6\",\n \"babel-plugin-parameter-decorator\": \"^1.0.16\",\n \"jest\": \"^29.7.0\",\n \"reflect-metadata\": \"^0.2.2\"\n }\n}\n```\n\nwith:\n\n```\nnpm i\n```\n\nconfigure `babel.config.json` using:\n\n```json\n{\n \"plugins\": [\n [\"@babel/plugin-proposal-decorators\", { \"legacy\": true }],\n \"babel-plugin-parameter-decorator\",\n \"@babel/plugin-proposal-class-properties\"\n ]\n}\n```\n\nthen write the following test `GHSA-53wg-r69p-v3r7.spec.ts`:\n\n```js\nrequire(\"reflect-metadata\");\nconst {\n createApplication,\n createModule,\n Injectable,\n Scope,\n ExecutionContext,\n gql,\n testkit,\n} = require(\"graphql-modules\");\n\ntest(\"accessing a singleton provider context during another asynchronous execution\", async () =\u003e {\n @Injectable({ scope: Scope.Singleton })\n class IdentifierProvider {\n @ExecutionContext()\n context;\n\n getId() {\n return this.context.identifier;\n }\n }\n\n const { promise: gettingBefore, resolve: gotBefore } = createDeferred();\n\n const { promise: waitForGettingAfter, resolve: getAfter } = createDeferred();\n\n const mod = createModule({\n id: \"mod\",\n providers: [IdentifierProvider],\n typeDefs: gql`\n type Query {\n getAsyncIdentifiers: Identifiers!\n }\n\n type Identifiers {\n before: String!\n after: String!\n }\n `,\n resolvers: {\n Query: {\n async getAsyncIdentifiers(_0, _1, context) {\n const before = context.injector.get(IdentifierProvider).getId();\n gotBefore();\n await waitForGettingAfter;\n const after = context.injector.get(IdentifierProvider).getId();\n return { before, after };\n },\n },\n },\n });\n\n const app = createApplication({\n modules: [mod],\n });\n\n const document = gql`\n {\n getAsyncIdentifiers {\n before\n after\n }\n }\n `;\n\n const firstResult$ = testkit.execute(app, {\n contextValue: {\n identifier: \"first\",\n },\n document,\n });\n\n await gettingBefore;\n\n const secondResult$ = testkit.execute(app, {\n contextValue: {\n identifier: \"second\",\n },\n document,\n });\n\n getAfter();\n\n await expect(firstResult$).resolves.toEqual({\n data: {\n getAsyncIdentifiers: {\n before: \"first\",\n after: \"first\",\n },\n },\n });\n\n await expect(secondResult$).resolves.toEqual({\n data: {\n getAsyncIdentifiers: {\n before: \"second\",\n after: \"second\",\n },\n },\n });\n});\n\nfunction createDeferred() {\n let resolve, reject;\n const promise = new Promise((res, rej) =\u003e {\n resolve = res;\n reject = rej;\n });\n return {\n promise,\n resolve,\n reject,\n };\n}\n```\n\nand execute using:\n\n```\nnpm test\n```\n\nYour project tree should look like this:\n\n```\nGHSA-53wg-r69p-v3r7\n package.json\n package-lock.json\n babel.config.json\n GHSA-53wg-r69p-v3r7.spec.js\n```\n\n#### Expected vs. Actual Outcome\n\n```diff\n- Expected - 1\n+ Received + 1\n\n Object {\n \"data\": Object {\n \"getAsyncIdentifiers\": Object {\n- \"after\": \"first\",\n+ \"after\": \"second\",\n \"before\": \"first\",\n },\n },\n }\n```\n\n### Impact\n\nAny application that uses services that inject the context using `@ExecutionContext()` from a singleton provider are at risk. The more traffic an application has, the higher the chance for parallel requests, the higher the risk.",
"id": "GHSA-53wg-r69p-v3r7",
"modified": "2026-01-21T16:20:01Z",
"published": "2026-01-16T21:09:08Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/graphql-hive/graphql-modules/security/advisories/GHSA-53wg-r69p-v3r7"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-23735"
},
{
"type": "WEB",
"url": "https://github.com/graphql-hive/graphql-modules/issues/2613"
},
{
"type": "WEB",
"url": "https://github.com/graphql-hive/graphql-modules/pull/2521"
},
{
"type": "PACKAGE",
"url": "https://github.com/graphql-hive/graphql-modules"
},
{
"type": "WEB",
"url": "https://github.com/graphql-hive/graphql-modules/releases/tag/release-1768575025568"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "GraphQL Modules has a Race Condition issue"
}
GHSA-544J-365H-QJ92
Vulnerability from github – Published: 2022-04-29 01:28 – Updated: 2022-04-29 01:28Race condition in BEA WebLogic Server and Express 5.1 through 7.0.0.1, when using in-memory session replication or replicated stateful session beans, causes the same buffer to be provided to two users, which could allow one user to see session data that was intended for another user.
{
"affected": [],
"aliases": [
"CVE-2003-1438"
],
"database_specific": {
"cwe_ids": [
"CWE-362"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2003-12-31T05:00:00Z",
"severity": "MODERATE"
},
"details": "Race condition in BEA WebLogic Server and Express 5.1 through 7.0.0.1, when using in-memory session replication or replicated stateful session beans, causes the same buffer to be provided to two users, which could allow one user to see session data that was intended for another user.",
"id": "GHSA-544j-365h-qj92",
"modified": "2022-04-29T01:28:04Z",
"published": "2022-04-29T01:28:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2003-1438"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/11221"
},
{
"type": "WEB",
"url": "http://dev.bea.com/resourcelibrary/advisoriesnotifications/BEA03-26.01.jsp"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/6717"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1006018"
}
],
"schema_version": "1.4.0",
"severity": []
}
Mitigation
In languages that support it, use synchronization primitives. Only wrap these around critical code to minimize the impact on performance.
Mitigation
Use thread-safe capabilities such as the data access abstraction in Spring.
Mitigation
- Minimize the usage of shared resources in order to remove as much complexity as possible from the control flow and to reduce the likelihood of unexpected conditions occurring.
- Additionally, this will minimize the amount of synchronization necessary and may even help to reduce the likelihood of a denial of service where an attacker may be able to repeatedly trigger a critical section (CWE-400).
Mitigation
When using multithreading and operating on shared variables, only use thread-safe functions.
Mitigation
Use atomic operations on shared variables. Be wary of innocent-looking constructs such as "x++". This may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read, followed by a computation, followed by a write.
Mitigation
Use a mutex if available, but be sure to avoid related weaknesses such as CWE-412.
Mitigation
Avoid double-checked locking (CWE-609) and other implementation errors that arise when trying to avoid the overhead of synchronization.
Mitigation
Disable interrupts or signals over critical parts of the code, but also make sure that the code does not go into a large or infinite loop.
Mitigation
Use the volatile type modifier for critical variables to avoid unexpected compiler optimization or reordering. This does not necessarily solve the synchronization problem, but it can help.
Mitigation MIT-17
Strategy: Environment Hardening
Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
CAPEC-26: Leveraging Race Conditions
The adversary targets a race condition occurring when multiple processes access and manipulate the same resource concurrently, and the outcome of the execution depends on the particular order in which the access takes place. The adversary can leverage a race condition by "running the race", modifying the resource and modifying the normal execution flow. For instance, a race condition can occur while accessing a file: the adversary can trick the system by replacing the original file with their version and cause the system to read the malicious file.
CAPEC-29: Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions
This attack targets a race condition occurring between the time of check (state) for a resource and the time of use of a resource. A typical example is file access. The adversary can leverage a file access race condition by "running the race", meaning that they would modify the resource between the first time the target program accesses the file and the time the target program uses the file. During that period of time, the adversary could replace or modify the file, causing the application to behave unexpectedly.