Skip to content

chore(deps): update dependency file-type to v21.3.1 [security]#494

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/npm-file-type-vulnerability
Mar 11, 2026
Merged

chore(deps): update dependency file-type to v21.3.1 [security]#494
renovate[bot] merged 1 commit into
mainfrom
renovate/npm-file-type-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
file-type 21.3.021.3.1 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2026-31808

Impact

A denial of service vulnerability exists in the ASF (WMV/WMA) file type detection parser. When parsing a crafted input where an ASF sub-header has a size field of zero, the parser enters an infinite loop. The payload value becomes negative (-24), causing tokenizer.ignore(payload) to move the read position backwards, so the same sub-header is read repeatedly forever.

Any application that uses file-type to detect the type of untrusted/attacker-controlled input is affected. An attacker can stall the Node.js event loop with a 55-byte payload.

Patches

Fixed in version 21.3.1. Users should upgrade to >= 21.3.1.

Workarounds

Validate or limit the size of input buffers before passing them to file-type, or run file type detection in a worker thread with a timeout.

References

  • Fix commit: 319abf871b50ba2fa221b4a7050059f1ae096f4f

Reporter

crnkovic@lokvica.com


Release Notes

sindresorhus/file-type (file-type)

v21.3.1

Compare Source

  • Fix infinite loop in ASF parser on malformed input 319abf8


Configuration

📅 Schedule: Branch creation - "" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot enabled auto-merge (squash) March 11, 2026 03:52
@renovate renovate Bot merged commit f930a91 into main Mar 11, 2026
53 of 54 checks passed
@renovate renovate Bot deleted the renovate/npm-file-type-vulnerability branch March 11, 2026 03:59
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.

0 participants