Security: vulnerable dependency image-size (CVE-2025-71329/71330) — maintained drop-in available
未关闭
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
描述
Context
This package depends on npm image-size. Upstream is archived and the latest release (2.0.2) remains affected by:
- CVE-2025-71329 — DoS via infinite loop (JXL/HEIF/JP2 zero-size boxes)
- CVE-2025-71330 — DoS via infinite loop (ICNS zero entry length)
npm audit fix will not switch package names automatically.
Maintained drop-in
Community MIT fork with the same public API as image-size@2.0.2:
- npm: https://www.npmjs.com/package/image-size-next (
image-size-next@2.1.0) - GitHub: https://github.com/lcf2212dev/image-size-next
- Announcement: https://github.com/lcf2212dev/image-size-next/blob/main/ANNOUNCE.md
Not affiliated with the original image-size maintainer — honest community fork only.
Migration options
A — Direct dependency
npm install image-size-next
- import { imageSize } from 'image-size'
+ import { imageSize } from 'image-size-next'
B — Force transitive resolution (npm 8.3+)
{
"overrides": {
"image-size": "npm:image-size-next@2.1.0"
}
}
Ask
Happy to open a PR for @kohout.jakub/react-native if useful. Thanks for maintaining open source.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 package.json 和所示的 imageSize 导入开始,检查 image-size 是直接依赖还是传递依赖,以及提议的 override 是否适用。完成的标准是:不再解析出存在漏洞的依赖,并且维护中的包保留现有的公共 API。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, react-native
- 领域
- mobile-dev, security
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 58/100