Repository navigation
fix(deps): update dependency @envelop/graphql-modules to v9 [security] - #51
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^5.0.0→^9.0.0@envelop/graphql-modules has a Race Condition vulnerability
GHSA-h3hw-29fv-2x75
More information
Details
Summary
Context race condition when using
useGraphQLModulespluginDetails
Related to: GHSA-53wg-r69p-v3r7
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() and graphql-modules are used in Yoga with
useGraphQLModules(application). This issue was fixed ingraphql-modulesin2.4.1and3.1.1but usinguseGraphQLModuleswill bypass theasync_hooksfix that was implemented.PoC
Create the following
package.jsonand runnpm i{ "name": "poc", "scripts": { "compile": "tsc", "start": "npm run compile && node ./dist/src/index.js", "test": "npm run compile && node ./dist/test/bleedtest.js" }, "dependencies": { "@envelop/graphql-modules": "^9.0.0", "graphql-yoga": "^5.0.0", "graphql": "^16.10.0", "graphql-modules": "3.1.1", "reflect-metadata": "0.2.1", "axios": "^1.8.4" }, "devDependencies": { "@types/node": "^22.14.1", "typescript": "^5.8.3" } }Define the app entrypoint:
src/index.tsCreate the test module:
src/module.tsAdd the Service that's to be injected
src/service.tsAdd the test case
test/bleedtest.jsThen run the server with
npm run startin one terminal and the testcase in another withnpm run test.The returned IDs should be identical as they are both read from the context within the same request.
However, there is a mismatch:
Impact
Any application that uses
useGraphQLModulesfrom@envelop/graphql-modulesalong with 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.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
graphql-hive/graphql-yoga (@envelop/graphql-modules)
v9.1.0Patch Changes
#2843
ab49fa2Thanks @enisdenjo! - Bind context to async execution avoiding
race-conditions
Updated dependencies
[
d3d83bc]:v9.0.0Patch Changes
[
0434fbd]:v8.0.0Patch Changes
[
3ebaa3b]:v7.1.3Patch Changes
[
914f9ed,914f9ed]:v7.1.2Patch Changes
[
26137e7,26137e7]:v7.1.1Patch Changes
[
90dd1a6,90dd1a6]:v7.1.0Patch Changes
[
a107c89,a107c89]:v7.0.2Patch Changes
[
5b6a166]:v7.0.1Patch Changes
61a88d8Thanks @renovate! - dependencies updates:
graphql-modules@^1 || ^2.0.0 || ^3.0.0↗︎(from
^1 || ^2.0.0, inpeerDependencies)v7.0.0Patch Changes
[
9bd1b20]:v6.0.0Major Changes
#1986
68e7a2a5Thanks @EmrysMyrddin! - Breaking Change: Support of Node 16
is dropped.
Updated dependencies
[
68e7a2a5,f7ef03c0]:Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.