Skip to content

Backport fix for CVE-2026-111497 (brotli block switch) - #25

Merged
jrsells merged 2 commits into
Asana:v22.21.1from
jrsells:cve-2026-111497
Oct 23, 2026
Merged

jrsells merged 2 commits into
Asana:v22.21.1from
jrsells:cve-2026-111497

Conversation

@jrsells

@jrsells jrsells commented Oct 23, 2026 •

Copy link
Copy Markdown

Cherry-picks nodejs/node@67d294739f and nodejs/node@a18ec92752 from v22.23.4, which together fix CVE-2026-111497.

Based on v22.21.1, the branch the shipped LunaServer Node binaries are built from (Build Node (Standard) run nodejs#110 and FIPS run #25, both at 0f26935; later commits on this branch only touch build scripts).

The conflict in test/parallel/test-zlib-invalid-input.js was resolved by keeping only the CVE-2026-111497 regression test. The other tests in that hunk depend on upstream zlib hardening changes this branch doesn't have.

@nneha-a nneha-a left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

eustas and others added 2 commits October 23, 2026 14:20
Original commit message:

  Detect and report invalid stream earlier.

  PiperOrigin-RevId: 876198329

PR-URL: https://github.com/nodejs-private/node-private/pull/1002
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2026-111497
(cherry picked from commit 67d2947)
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1002
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2026-111497
(cherry picked from commit a18ec92)
@jrsells
jrsells changed the base branch from main to v22.21.1 October 23, 2026 21:20

@harshita-gupta harshita-gupta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving to unblock

@jrsells
jrsells merged commit d3cff29 into Asana:v22.21.1 Oct 23, 2026
14 of 34 checks passed
@semgrep-code-asana

Copy link
Copy Markdown

Semgrep found 1 ssc-9e16049c-d627-4ef3-9759-3139101c4fa9 finding:

  • deps/cjs-module-lexer/src/package-lock.json

🟑 Medium severity issue identified in your code:

Risk: Affected versions of @babel/helpers, @babel/runtime, @babel/runtime-corejs2, and @babel/runtime-corejs3 are vulnerable to Inefficient Regular Expression Complexity. Babel generates a polyfill (the wrapRegExp helper) for String.prototype.replace on regular expressions with named capturing groups that has quadratic (ReDoS) complexity when an untrusted replacement string containing the substring $< is processed. The vulnerable code is generated polyfill code rather than a symbol you call directly, so any project transpiling named capturing groups against affected browser targets is at risk. Upgrade to a patched version and recompile your code to remediate.

Fix: Upgrade this library to at least version 7.26.10 at node/deps/cjs-module-lexer/src/package-lock.json:273.

Reference(s): https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-7806, GHSA-968p-4wvh-cqc8, CVE-2025-27789

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 2 ssc-ace67ff4-0843-40f4-a8d3-13e050943589 findings:

🟑 Medium severity issue identified in your code:

Risk: Affected versions of js-yaml are vulnerable to Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'). js-yaml is vulnerable to prototype pollution through its YAML merge key (<<) handling. When parsing untrusted YAML with load, loadAll, safeLoad, or safeLoadAll, a crafted document containing a __proto__ key inside a merged mapping can modify the prototype of the resulting object, leading to integrity violations in the application.

Manual Review Advice: A vulnerability from this advisory is reachable if you are using js-yaml on the CLI

Fix: Upgrade this library to at least version 4.1.1 at node/tools/eslint/package-lock.json:1444.

Reference(s): https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-175314, GHSA-mh29-5h37-fv8m, CVE-2025-64718

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 ssc-aa35fabd-3d1b-413d-b015-687a241b8fee finding:

🟠 High severity issue identified in your code:

Risk: Affected versions of markdown-it are vulnerable to Inefficient Algorithmic Complexity / Uncontrolled Resource Consumption. markdown-it is vulnerable to Denial of Service when the typographer option is enabled: the smartquotes rule has quadratic complexity on input with many opening quotes followed by unmatched closing quotes of the other kind, so rendering crafted Markdown can exhaust CPU.

Manual Review Advice: A vulnerability from this advisory is reachable if you run markdown-it with -t or --typographer flag via the CLI

Fix: Upgrade this library to at least version 14.3.2 at node/deps/minimatch/package-lock.json:3158.

Reference(s): https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-104538, GHSA-r7fv-28h4-cvq7, CVE-2026-111759

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 ssc-d4e4da47-6047-4021-be8e-77e83ef115e7 finding:

🟠 High severity issue identified in your code:

Risk: Affected versions of markdown-it are vulnerable to Inefficient Algorithmic Complexity / Uncontrolled Resource Consumption. markdown-it processes link reference definitions with an unclosed, multi-line label or title in quadratic time in its block "reference" rule. Passing attacker-controlled Markdown to render() or parse() with default options can block the Node.js event loop (or browser main thread) for many seconds (denial of service). renderInline()/parseInline() do not run the block parser and are not affected; the "zero" preset or md.disable("reference") also avoid the vulnerable rule.

Manual Review Advice: A vulnerability from this advisory is reachable if you run markdown-it via the CLI

Fix: Upgrade this library to at least version 14.3.3 at node/deps/minimatch/package-lock.json:3158.

Reference(s): https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-105358, GHSA-gfr2-rv44-r23c

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 2 ssc-7b1f4e28-6c05-4a3d-9f52-8ad4c0b71e63 findings:

🟠 High severity issue identified in your code:

Risk: Affected versions of js-yaml are vulnerable to Inefficient Algorithmic Complexity / Uncontrolled Resource Consumption. js-yaml is vulnerable to CPU exhaustion when parsing untrusted YAML: the maxTotalMergeKeys budget is only charged for keys that a merge (<<) source actually contributes, so empty mappings cost nothing against the limit. A small document that merges a long sequence of empty mappings repeatedly forces O(N*K) work while the counter stays flat, stalling the process. Merge keys are part of the default schema for every load entrypoint (load, loadAll, and the 3.x safeLoad/safeLoadAll), and lowering maxTotalMergeKeys does not mitigate it.

Manual Review Advice: A vulnerability from this advisory is reachable if you are using js-yaml on the CLI

Fix: Upgrade this library to at least version 4.3.2 at node/tools/eslint/package-lock.json:1444.

Reference(s): https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-69712, GHSA-2883-xcg3-v3hh, CVE-2026-84375

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 2 ssc-7b3c1e5a-9d24-4f80-b6a1-2c8e0f35d719 findings:

🟠 High severity issue identified in your code:

Risk: Affected versions of js-yaml are vulnerable to Inefficient Algorithmic Complexity. An attacker can supply a YAML document containing a large !!omap sequence, which js-yaml resolves with a linear duplicate-key scan inside its per-element loop. Resolution is therefore quadratic in the number of entries, so a modestly sized document consumes disproportionate CPU inside the load call and blocks the event loop, resulting in a denial of service.

Manual Review Advice: A vulnerability from this advisory is reachable if you are using js-yaml on the CLI

Fix: Upgrade this library to at least version 4.3.1 at node/tools/eslint/package-lock.json:1444.

Reference(s): GHSA-5p4m-2wfm-xmqj

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 2 ssc-b5be3fd7-c1fb-4156-b16f-2fc35cb62b00 findings:

🟠 High severity issue identified in your code:

Risk: Affected versions of js-yaml are vulnerable to Inefficient Algorithmic Complexity / Uncontrolled Resource Consumption. An attacker can supply a YAML document containing a chain of mappings that each merge the previous one via the merge key (<<), causing js-yaml to spend quadratic CPU time while parsing input whose size grows only linearly, resulting in a denial of service.

Manual Review Advice: A vulnerability from this advisory is reachable if you are using js-yaml on the CLI

Fix: Upgrade this library to at least version 4.3.0 at node/tools/eslint/package-lock.json:1444.

Reference(s): https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-42301, GHSA-52cp-r559-cp3m, CVE-2026-59869

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 ssc-17eda294-146f-4ed3-91f7-5ef1b349d687 finding:

  • deps/cjs-module-lexer/src/package-lock.json

πŸ”΄ Critical severity issue identified in your code:

Risk: Affected versions of @babel/traverse and babel-traverse are vulnerable to Incomplete List of Disallowed Inputs / Incorrect Comparison. Compiling untrusted code with Babel using plugins that invoke the internal path.evaluate() or path.evaluateTruthy() methods (for example @babel/plugin-transform-runtime, @babel/preset-env with useBuiltIns, or any polyfill‐provider plugin) allows a maliciously crafted AST to execute arbitrary code on the build machine during compilation.

Manual Review Advice: A vulnerability from this advisory is reachable if you use Babel to compile untrusted JavaScript

Fix: Upgrade this library to at least version 7.23.2 at node/deps/cjs-module-lexer/src/package-lock.json:344.

Reference(s): https://euvd.enisa.europa.eu/vulnerability/EUVD-2023-2669, GHSA-67hx-6x53-jw92, CVE-2023-45133

Please reach out to Security (go/sec-inbox) if you need help with this.

@semgrep-code-asana

Copy link
Copy Markdown

Semgrep found 47 unquoted-variable-expansion-in-command findings:

πŸ”΅ Low severity issue identified in your code:

Variable expansions must be double-quoted so as to prevent being split into multiple pieces according to whitespace or whichever separator is specified by the IFS variable. If you really wish to split the variable's contents, you may use a variable that starts with an underscore e.g. $_X instead of $X, and semgrep will ignore it. If what you need is an array, consider using a proper bash array.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 3 useless-cat findings:

🟑 Medium severity issue identified in your code:

Useless call to 'cat' in a pipeline. Use '<' and '>' for any command to read from a file or write to a file.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 exec-detected finding:

🟑 Medium severity issue identified in your code:

Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 missing-autoescape-disabled finding:

🟑 Medium severity issue identified in your code:

Detected a Jinja2 environment without autoescaping. Jinja2 does not autoescape by default. This is dangerous if you are rendering to a browser because this allows for cross-site scripting (XSS) attacks. If you are in a web context, enable autoescaping by setting 'autoescape=True.' You may also consider using 'jinja2.select_autoescape()' to only enable automatic escaping for certain file extensions.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 eval-detected finding:

  • benchmark/source_map/source-map-cache.js

🟑 Medium severity issue identified in your code:

Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 npm-missing-minimum-release-age finding:

🟑 Medium severity issue identified in your code:

This .npmrc does not set a minimum release age or sets it too low. Newly published packages can be malicious or unstable. Add min-release-age = 7 to wait 7 days before resolving newly published package versions. Added in: v11.10 Reference: https://github.blog/changelog/2026-02-18-npm-bulk-trusted-publishing-config-and-script-security-now-generally-available/

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 4 dependabot-missing-cooldown findings:

🟑 Medium severity issue identified in your code:

This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a cooldown block with default-days: 7 to each package-ecosystem entry under updates to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 12 github-actions-mutable-action-tag findings:

🟑 Medium severity issue identified in your code:

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks β€” as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 3 crypto-weak-algorithm findings:

🟑 Medium severity issue identified in your code:

The use of a weak cryptographic algorithm (e.g., SHA-1 or MD5) has been identified. These algorithms are considered insecure due to vulnerabilities that make them susceptible to collision attacks, allowing attackers to compromise data integrity or security. Replace SHA-1 or MD5 with secure hashing algorithms, such as: SHA-256 or higher (e.g., SHA-3).

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>lib/_tls_wrap.js</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0["<a href=https://github.com/Asana/node/blob/c4fecfb7f29ed843c1c193d4134f701414292128/lib/_tls_wrap.js#L1573 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1573] &apos;sha1&apos;</a>"]
        end
        %% Intermediate

        %% Sink

        subgraph Sink
            direction LR

            v1["<a href=https://github.com/Asana/node/blob/c4fecfb7f29ed843c1c193d4134f701414292128/lib/_tls_wrap.js#L1573 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1573] &apos;sha1&apos;</a>"]
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    File0:::invis

    %% Connections

    Source --> Sink

Loading

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 eval-detected finding:

🟑 Medium severity issue identified in your code:

Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 dynamic-urllib-use-detected finding:

  • tools/configure.d/nodedownload.py

🟑 Medium severity issue identified in your code:

Detected a dynamic value being used with urllib. urllib supports 'file://' schemes, so a dynamic value controlled by a malicious actor may allow them to read arbitrary files. Audit uses of urllib calls to ensure user data cannot control the URLs, or consider using the 'requests' library instead.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 detected-npm-registry-auth-token finding:

🟠 High severity issue identified in your code:

NPM registry authentication token detected

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 3 detected-private-key findings:

🟠 High severity issue identified in your code:

Private Key detected. This is a sensitive credential and should not be hardcoded here. Instead, store this in a separate, private file.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 2 dangerous-subprocess-use-tainted-env-args findings:

🟠 High severity issue identified in your code:

Detected subprocess function 'run' with user controlled data. A malicious actor could leverage this to perform command injection. You may consider using 'shlex.quote()'.

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>tools/gyp/pylib/gyp/common.py</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0["<a href=https://github.com/Asana/node/blob/c4fecfb7f29ed843c1c193d4134f701414292128/tools/gyp/pylib/gyp/common.py#L432 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 432] os.environ.get(&quot;CC_target&quot;)</a>"]
        end
        %% Intermediate

        subgraph Traces0[Traces]
            direction TB

            v2["<a href=https://github.com/Asana/node/blob/c4fecfb7f29ed843c1c193d4134f701414292128/tools/gyp/pylib/gyp/common.py#L432 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 432] CC</a>"]

            v3["<a href=https://github.com/Asana/node/blob/c4fecfb7f29ed843c1c193d4134f701414292128/tools/gyp/pylib/gyp/common.py#L433 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 433] replace_sep</a>"]

            v4["<a href=https://github.com/Asana/node/blob/c4fecfb7f29ed843c1c193d4134f701414292128/tools/gyp/pylib/gyp/common.py#L429 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 429] s</a>"]

            v5["<a href=https://github.com/Asana/node/blob/c4fecfb7f29ed843c1c193d4134f701414292128/tools/gyp/pylib/gyp/common.py#L433 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 433] cmd</a>"]

            v6["<a href=https://github.com/Asana/node/blob/c4fecfb7f29ed843c1c193d4134f701414292128/tools/gyp/pylib/gyp/common.py#L463 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 463] real_cmd</a>"]
        end
            v2 --> v3
            v3 --> v4
            v4 --> v5
            v5 --> v6
        %% Sink

        subgraph Sink
            direction LR

            v1["<a href=https://github.com/Asana/node/blob/c4fecfb7f29ed843c1c193d4134f701414292128/tools/gyp/pylib/gyp/common.py#L466 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 466] real_cmd</a>"]
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    Traces0:::invis
    File0:::invis

    %% Connections

    Source --> Traces0
    Traces0 --> Sink

Loading

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 gha-curl-pipe-shell finding:

  • .github/workflows/create-release-proposal.yml

🟠 High severity issue identified in your code:

A run: step pipes the output of curl or wget directly into a shell interpreter. This is the "curl | bash" install pattern β€” if the remote server is compromised or the URL is hijacked, an attacker can execute arbitrary code in your CI runner. Consider downloading the file first, verifying its checksum or signature, and then executing it.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 run-shell-injection finding:

  • .github/workflows/build-node-openssl-fips.yml

🟠 High severity issue identified in your code:

Using variable interpolation ${{...}} with github context data in a run: step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. github context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with env: to store the data and use the environment variable in the run: script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 1 subprocess-shell-true finding:

🟠 High severity issue identified in your code:

Found 'subprocess' function 'run' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead.

Please reach out to Security (go/sec-inbox) if you need help with this.

Semgrep found 3 use-defused-xml findings:

  • tools/v8-json-to-junit.py
  • tools/gyp/tools/pretty_vcproj.py
  • deps/v8/third_party/abseil-cpp/absl/abseil.podspec.gen.py

🟠 High severity issue identified in your code:

The Python documentation recommends using defusedxml instead of xml because the native Python xml library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service.

Please reach out to Security (go/sec-inbox) if you need help with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants