fix(deps): update dependency uuid to v14 [security]#4298
fix(deps): update dependency uuid to v14 [security]#4298renovate-bot wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Conversation
|
/gcbrun |
There was a problem hiding this comment.
Code Review
This pull request updates the uuid dependency to version 14 across multiple packages. The review feedback identifies that uuid v14 requires Node.js >= 20.0.0 and is ESM-only, which creates critical incompatibilities with the current engine specifications and CommonJS require() calls in several packages. Additionally, the @types/uuid devDependency is now redundant and should be removed.
| "@google-cloud/storage": "^7.19.0", | ||
| "node-fetch": "^2.6.7", | ||
| "uuid": "^8.0.0", | ||
| "uuid": "^14.0.0", |
There was a problem hiding this comment.
This update to uuid v14 is incompatible with the declared Node.js version support (>=12 on line 7). uuid v14 requires Node.js >= 20.0.0. Furthermore, the removal of CommonJS support in uuid v12+ will break any require('uuid') calls in this package, as it is not configured as an ES module. Since this is a production dependency, this change is critical.
| "chai": "^4.5.0", | ||
| "mocha": "^10.0.0", | ||
| "uuid": "^10.0.0", | ||
| "uuid": "^14.0.0", |
There was a problem hiding this comment.
Updating to uuid v14 introduces significant breaking changes that are incompatible with the current project configuration:
- Node.js Version:
uuidv14 requires Node.js >= 20.0.0 (due to its dependency on the globalcryptoobject). This conflicts with theenginesrequirement of>=16.0.0specified on line 7. - ESM Requirement:
uuiddropped CommonJS support in v12. Since this package does not specify"type": "module", it likely usesrequire(), which will fail at runtime with this version.
If this update is necessary for security, the project's Node.js requirement and module type should be updated accordingly.
| "proxyquire": "^2.1.3", | ||
| "supertest": "^7.0.0", | ||
| "uuid": "^10.0.0" | ||
| "uuid": "^14.0.0" |
This PR contains the following updates:
^10.0.0→^14.0.0^8.0.0→^14.0.0^11.0.5→^14.0.0^11.1.0→^14.0.0uuid: Missing buffer bounds check in v3/v5/v6 when buf is provided
GHSA-w5hq-g745-h8pq
More information
Details
Summary
v3,v5, andv6accept external output buffers but do not reject out-of-range writes (smallbufor largeoffset).By contrast,
v4,v1, andv7explicitly throwRangeErroron invalid bounds.This inconsistency allows silent partial writes into caller-provided buffers.
Affected code
src/v35.ts(v3/v5path) writesbuf[offset + i]without bounds validation.src/v6.tswritesbuf[offset + i]without bounds validation.Reproducible PoC
Observed:
v4 THREW RangeErrorv5 NO_THROWv6 NO_THROWExample partial overwrite evidence captured during audit:
Security impact
Suggested fix
Add the same guard used by
v4/v1/v7:Apply to:
src/v35.ts(coversv3andv5)src/v6.tsSeverity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
uuidjs/uuid (uuid)
v14.0.0Compare Source
Security
v3(),v5(), andv6()did not validate that writes would remain within the bounds of a caller-supplied buffer, allowing out-of-bounds writes when an invalidoffsetwas provided. ARangeErroris now thrown ifoffset < 0oroffset + 16 > buf.length.⚠ BREAKING CHANGES
cryptois now expected to be globally defined (requires node@20+) (#935)v13.0.0Compare Source
⚠ BREAKING CHANGES
Bug Fixes
v12.0.0Compare Source
⚠ BREAKING CHANGES
Features
Bug Fixes
v11.1.0Compare Source
Features
Uint8Arraysubtypes forbufferoption (#865) (a5231e7)v11.0.5Compare Source
Bug Fixes
v11.0.4Compare Source
Bug Fixes
v1(),v4(), andv7()(#845) (e0ee900)v11.0.3Compare Source
Bug Fixes
v11.0.2Compare Source
Bug Fixes
v11.0.1Compare Source
Bug Fixes
v11.0.0Compare Source
⚠ BREAKING CHANGES
Features
Bug Fixes
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.