Skip to content

fix(deps): update file-type to 21.3.1 [security]#686

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

fix(deps): update file-type to 21.3.1 [security]#686
renovate[bot] wants to merge 1 commit intodevelopmentfrom
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 19.6.021.3.1 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

v20.5.0

Compare Source

  • Add support Office PowerPoint 2007 (macro-enabled) slide show (#​747) f1b4c7a

v20.4.1

Compare Source

  • Add workaround for using bundler as the module-resolution in TypeScript (#​744) 90bfe33

v20.4.0

Compare Source


v20.3.0

Compare Source


v20.2.0

Compare Source


v20.1.0

Compare Source


v20.0.1

Compare Source


v20.0.0

Compare Source

Breaking
  • Drop MIME-type and extension enumeration in types (#​693) 0ff11c6
  • Remove NodeFileTypeParser in favor of using FileTypeParser on all platforms (#​707) ff8eed8
Improvements
Fixes


Configuration

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

🚦 Automerge: Enabled.

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.

@renovate
Copy link
Contributor Author

renovate bot commented Mar 11, 2026

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm warn Unknown env config "store". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: enzyme-adapter-react-16@1.15.8
npm error Found: react@18.3.1
npm error node_modules/react
npm error   react@"^18.3.1" from the root project
npm error   peer react@">=16.8.0" from @emotion/react@11.13.3
npm error   node_modules/@emotion/react
npm error     @emotion/react@"11.13.3" from the root project
npm error     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.13.0
npm error     node_modules/@emotion/styled
npm error       @emotion/styled@"11.13.0" from the root project
npm error     1 more (react-select)
npm error   32 more (@emotion/styled, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.0.0-0" from enzyme-adapter-react-16@1.15.8
npm error node_modules/enzyme-adapter-react-16
npm error   dev enzyme-adapter-react-16@"^1.15.3" from the root project
npm error
npm error Conflicting peer dependency: react@16.14.0
npm error node_modules/react
npm error   peer react@"^16.0.0-0" from enzyme-adapter-react-16@1.15.8
npm error   node_modules/enzyme-adapter-react-16
npm error     dev enzyme-adapter-react-16@"^1.15.3" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /runner/cache/others/npm/_logs/2026-03-13T16_40_17_201Z-eresolve-report.txt
npm error A complete log of this run can be found in: /runner/cache/others/npm/_logs/2026-03-13T16_40_17_201Z-debug-0.log

@renovate renovate bot force-pushed the renovate/npm-file-type-vulnerability branch from a2f4c38 to 2fa4a50 Compare March 13, 2026 16:40
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.

1 participant