fix: remove unused uuid dependency from api-graphql, predictions, and interactions#14788
Merged
bobbor merged 2 commits intoaws-amplify:mainfrom Apr 30, 2026
Conversation
🦋 Changeset detectedLatest commit: c7015ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Thank you for your contribution! There is another file that still uses uuid: Additionally, please make sure to add a changeset. |
… interactions Remove direct uuid dependency from packages that don't need it to address GHSA-w5hq-g745-h8pq (out-of-bounds write in uuid v3/v5/v6). - api-graphql: removed uuid dep (already uses amplifyUuid from core) - predictions: removed uuid dep (never imported) - interactions: replaced direct uuid import with amplifyUuid from core The uuid dependency is now consolidated in @aws-amplify/core, which is the only package that wraps uuid v4 via amplifyUuid.
a216d01 to
178a8c0
Compare
Contributor
Author
Done |
soberm
approved these changes
Apr 29, 2026
This was referenced Apr 30, 2026
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
Removes the direct
uuiddependency from packages that don't need it, consolidating all UUID generation through@aws-amplify/core'samplifyUuidwrapper. This addresses the security advisory GHSA-w5hq-g745-h8pq.Motivation
Dependabot flagged
uuidfor an out-of-bounds write vulnerability inv3(),v5(), andv6()when a caller-supplied buffer has an invalid offset. While this project only usesv4()(which is not affected), the cleanest resolution is to remove the unnecessary direct dependency from packages that never use it, and consolidate through core.Changes
@aws-amplify/api-graphqluuidfrom dependencies — was never imported directly (usesamplifyUuidfrom core)@aws-amplify/predictionsuuidfrom dependencies — was never imported anywhere in the package@aws-amplify/interactionsimport { v4 as uuid } from 'uuid'withamplifyUuidfrom@aws-amplify/core/internals/utils, then removeduuidfrom dependenciesAfter these changes,
uuidexists only as a dependency in@aws-amplify/core(^11.0.0), which is the single package that wrapsuuid.v4()viaamplifyUuid.Why not upgrade to uuid@14?
uuid@12+ dropped CommonJS support. Since amplify-js builds both CJS and ESM outputs with
uuidkept as an external (not bundled), upgrading would break the CJS build at runtime. Staying on v11 is safe because onlyv4()is used, which is unaffected by the vulnerability.Testing
amplifyUuid()is already a direct re-export ofuuid.v4()@aws-amplify/core/internals/utilsforgetAmplifyUserAgentObject, so this follows the existing pattern