Skip to content

fix: resolve image-size to image-size-next (CVE-2025-71329/71330) - #57895

Closed
lcf2212dev wants to merge 1 commit into
react:mainfrom
lcf2212dev:security/image-size-next-cve-2025
Closed

fix: resolve image-size to image-size-next (CVE-2025-71329/71330)#57895
lcf2212dev wants to merge 1 commit into
react:mainfrom
lcf2212dev:security/image-size-next-cve-2025

Conversation

@lcf2212dev

@lcf2212dev lcf2212dev commented Aug 11, 2026

Copy link
Copy Markdown

Summary

metro@^0.87.0 (pulled into this monorepo) depends on image-size@^1.0.2, which currently resolves to an archived / unmaintained package still affected by:

This PR adds a Yarn resolutions entry so nested image-size installs resolve to the community MIT drop-in image-size-next@2.1.0 (same public API as image-size@2.x, drop-in for Metro’s usage), and updates yarn.lock accordingly.

Not affiliated with the original image-size maintainer.

Relates to #57888

Changelog:

[GENERAL] [SECURITY] - Force resolution of vulnerable image-size to maintained image-size-next@2.1.0 (CVE-2025-71329 / CVE-2025-71330)

Test Plan:

  • Confirmed with Yarn classic 1.22.x that "resolutions": { "image-size": "npm:image-size-next@2.1.0" } installs image-size-next@2.1.0 into the image-size slot used by Metro.
  • yarn.lock updated to the published tarball + integrity for image-size-next@2.1.0.
  • Recommend CI: full install + existing Metro/asset pipeline tests.

Notes for reviewers

  • Longer-term fix may live in facebook/metro (change the direct dependency). This monorepo resolution unblocks RN consumers immediately.
  • npm audit fix cannot rename packages; an override/resolution is required.

(Replaces closed PR #57894 — fresh branch with signed commit.)

Metro pulls image-size@^1.0.2 which resolves to an unmaintained package
with open DoS CVEs. Force a Yarn resolution to the community drop-in
image-size-next@2.1.0 (same public API, MIT).

Relates to react#57888
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 11, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 11, 2026
@robhogan

Copy link
Copy Markdown
Contributor

The root package.json / yarn.lock are not distributed to RN consumers (only contributors), so this doesn’t do what it claims to do. The right place to change Metro dependencies is Metro.

Just to be clear as well, the CVEs listed are audit noise - they pose no risk to RN / Metro users because Metro never loads images from untrusted sources.

@robhogan robhogan closed this Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants