fix: replace vulnerable image-size with image-size-next (CVE-2025-71329/71330) - #1852
Closed
lcf2212dev wants to merge 1 commit into
Closed
fix: replace vulnerable image-size with image-size-next (CVE-2025-71329/71330)#1852lcf2212dev wants to merge 1 commit into
lcf2212dev wants to merge 1 commit into
Conversation
image-size is archived and still affected by CVE-2025-71329 / CVE-2025-71330 (DoS infinite loops). Switch Metro's direct dependency and Assets imports/tests to the community MIT drop-in image-size-next@2.1.0 (same public API).
lcf2212dev
force-pushed
the
fix/image-size-next-cve
branch
from
August 11, 2026 03:00
5098c65 to
2d87737
Compare
Author
|
Closing in favor of a new PR with a properly signed commit (no force-push on this branch). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Metro depends on
image-size@^1.0.2, used inAssets.jsto read image dimensions. Upstreamimage-sizeis archived and remains affected by:This PR switches the direct dependency and source/tests to the community MIT drop-in
image-size-next@2.1.0, which keeps the same public API (default/imageSizeexport used asgetImageSize(buffer)).Not affiliated with the original
image-sizemaintainer.Code changes
packages/metro/package.json—image-size→image-size-next@2.1.0packages/metro/src/Assets.js— import fromimage-size-nextpackages/metro/src/__tests__/Assets-test.js— jest mock pathyarn.lock— lock entry forimage-size-next@2.1.0Test plan
yarninstall in monorepometro/Assets-test.jsgetAssetSizerequire('image-size')/from 'image-size'inpackages/metroNote
A monorepo-level Yarn resolution was also proposed on React Native (#57894) as a temporary shield for nested installs. Landing the dependency change here is the durable fix for all Metro consumers.