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-bot nodejs-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

github-actions Bot commented Sep 4, 2026

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 issue Issues 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.

Sign up for free to 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_process Issues and PRs related to the child_process subsystem. needs-ci PRs 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