Skip to content

Conversation

@prestoalvarez
Copy link
Contributor

The extractFileFromTarball function in npm/src/install.mjs could enter an infinite loop when processing TAR archives with corrupted or malicious headers. If fileSize parsing resulted in NaN (due to invalid octal data in the TAR header), the offset calculation (offset + fileSize + 511) & ~511 would evaluate to 0, causing the parser to repeatedly process the same header block without advancing.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant