Skip to content

fix(security): pin mysql2 to >=3.22.0 to resolve high-severity audit finding - #1428

Merged
K1NGD4VID merged 1 commit into
LabsCrypt:mainfrom
Ajibose:security/pin-mysql2-audit-fix
Sep 2, 2026
Merged

fix(security): pin mysql2 to >=3.22.0 to resolve high-severity audit finding#1428
K1NGD4VID merged 1 commit into
LabsCrypt:mainfrom
Ajibose:security/pin-mysql2-audit-fix

Conversation

@Ajibose

@Ajibose Ajibose commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • npm audit --omit=dev --audit-level=high currently fails on main (and therefore on every PR) because prisma@7.10.0 pulls in mysql2@3.15.3 as an optional driver dependency, flagged for GHSA-3f6p-5ww8-9rcr (auth plugin downgrade leaking plaintext credentials).
  • mysql2 is unused at runtime — this project only targets Postgres — so it's safe to pin via overrides, following the existing pattern already used in package.json for postcss/sharp/react.
  • Bumps mysql2 to ^3.22.0 (resolves to 3.24.2); regenerated package-lock.json accordingly.

Test plan

  • npm audit --omit=dev --audit-level=high → 0 vulnerabilities
  • npx vitest run in backend/ → 51 test files, 404 passed / 16 skipped, 0 failed
  • CI: Dependency Vulnerability Scan should now pass

…finding

prisma@7.10.0 pulls in mysql2@3.15.3 as an optional driver dependency
(unused at runtime — this project only targets Postgres), which is
flagged by `npm audit` for GHSA-3f6p-5ww8-9rcr (auth plugin downgrade
leaking plaintext credentials). Add an npm override, following the
existing pattern used for postcss/sharp/react in this file, to force
mysql2 to a patched version.

`npm audit --omit=dev --audit-level=high` now reports 0 vulnerabilities.
@K1NGD4VID
K1NGD4VID merged commit be83767 into LabsCrypt:main Sep 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants