Skip to content

fix(deps): update dependency file-type to v21 [security]#2102

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-file-type-vulnerability
Open

fix(deps): update dependency file-type to v21 [security]#2102
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-file-type-vulnerability

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 11, 2026

This PR contains the following updates:

Package Change Age Confidence
file-type ^20.0.0^21.0.0 age 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

v21.3.0

Compare Source

  • Add support for Mach-O Universal (aka "Fat") binaries and additional architectures (#​779) d223491

v21.2.0

Compare Source


v21.1.1

Compare Source


v21.1.0

Compare Source


v21.0.0

Compare Source

Breaking
  • Require Node.js 20 24aec1f
  • Drop Adobe Illustrator (.ai) detection support (#​743) af169f3
  • Correct Matroska (video) MIME-type to formal IANA registration (#​753) f53f5ff
  • Correct FLAC MIME-type to formal IANA registration (#​755) b9fda36
  • Correct Apache Parquet MIME-type to formal IANA registration (#​748) 98e3f8e
  • Correct Apache Arrow MIME-type to formal IANA registration (#​754) 7184775
Improvements
Fixes


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, 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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 11, 2026

Deploying graph-tooling with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3baddad
Status: ✅  Deploy successful!
Preview URL: https://fd7ba3ba.graph-tooling.pages.dev
Branch Preview URL: https://renovate-npm-file-type-vulne.graph-tooling.pages.dev

View logs

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Mar 11, 2026
@renovate renovate bot requested review from 0237h and YaroShkvorets March 11, 2026 02:04
@changeset-bot
Copy link

changeset-bot bot commented Mar 11, 2026

⚠️ No Changeset found

Latest commit: 3baddad

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants