Skip to content

src, child_process: fix fatal error on Array prototype pollution - #65791

Open
Soumyadeep765 wants to merge 1 commit into
nodejs:mainfrom
Soumyadeep765:main
Open

src, child_process: fix fatal error on Array prototype pollution#65791
Soumyadeep765 wants to merge 1 commit into
nodejs:mainfrom
Soumyadeep765:main

Conversation

@Soumyadeep765

Copy link
Copy Markdown

Add an object check in ParseStdioOptions to prevent V8 from crashing with "v8::ToLocalChecked Empty MaybeLocal" when Array.prototype has been polluted. This replaces the fatal error with a controlled JavaScript TypeError (ERR_INVALID_ARG_TYPE).

Fixes: #56531

Assisted-by: Antigravity

Add an object check in ParseStdioOptions to prevent V8 from
crashing with "v8::ToLocalChecked Empty MaybeLocal" when
Array.prototype has been polluted. This replaces the fatal error
with a controlled JavaScript TypeError (ERR_INVALID_ARG_TYPE).
Fixes: nodejs#56531
Signed-off-by: soumyadeep765 <soumyadeepdas765@gmail.com>
Assisted-by: Antigravity
@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. child_process Issues and PRs related to the child_process subsystem. needs-ci PRs that need a full CI run. labels Sep 4, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

@MikeMcC399

Copy link
Copy Markdown
Contributor

This PR proposes a fix for #56531 which has the label good first issueIssues that are suitable for first-time contributors. attached.

AI use policy and guidelines says:

It's prohibited to use AI to automate fixes to issues marked as "good first issue". These issues are meant to help new human contributors, not an AI, learn about the code base and the contribution processes.

Soumyadeep765@a329954 however contains the following text which suggests that AI was used to automate the fix:

Signed-off-by: soumyadeep765 soumyadeepdas765@gmail.com
Assisted-by: Antigravity

The PR has not followed the Pull Request guide which advises to create a local branch, as described in Step 2: Branch. Changes have been made in the fork's main branch.

See Pull requests > Step 6: Test

Before submitting your changes in a pull request, always run the full Node.js test suite.

with further details under [BUILDING > Running tests](Running tests) including:

make lint/ vcbuild lint for linting only.

@codecov

codecovBot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 90.15%. Comparing base (1e9fd95) to head (a329954).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #65791 +/- ##
==========================================
- Coverage 90.17% 90.15% -0.03% 
==========================================
Files 769 769 Lines 261448 261451 +3 Branches 49674 49655 -19 ==========================================
- Hits 235759 235702 -57 - Misses 16736 16770 +34 - Partials 8953 8979 +26 
Files with missing linesCoverage Ξ”
src/process_wrap.cc76.25% <100.00%> (+1.25%)⬆️

... and 32 files with indirect coverage changes

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

c++Issues and PRs that require attention from people who are familiar with C++.child_processIssues and PRs related to the child_process subsystem.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal

3 participants

@Soumyadeep765@MikeMcC399@nodejs-github-bot