Skip to content

fix: resolve path hijack (W-23905795) - #539

Merged
soridalac merged 5 commits into
mainfrom
d/W-23905795
Aug 19, 2026
Merged

fix: resolve path hijack (W-23905795)#539
soridalac merged 5 commits into
mainfrom
d/W-23905795

Conversation

@jfeingold35

Copy link
Copy Markdown
Contributor

What does this PR do?

Addresses a security vulnerability for Windows wherein the folder path could contain malicious command injection.

What issues does this PR fix or reference?

@W-23905795@

Comment thread src/generator.ts
const resolvedCmd = [resolved.toString(), ...args.slice(1)].join(' ');

this.logger.debug(`Executing command: ${resolvedCmd}`);
shelljs.exec(resolvedCmd, { cwd: this.cwd });

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Long-term, we should aim to replace all of the shelljs uses with cross-spawn. However, the other invocations didn't seem to have this specific vulnerability, and I didn't want to gut the package so close to moratorium, so I just kept the fix minimal.

@soridalac
soridalac merged commit bbdd914 into main Aug 19, 2026
13 checks passed
@soridalac
soridalac deleted the d/W-23905795 branch August 19, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants