Skip to content

fix(deps): drop vulnerable fast-xml-parser from reconciliation lambda#9765

Open
eliotlim wants to merge 1 commit into
developfrom
fix/deps-recon-fast-xml-parser
Open

fix(deps): drop vulnerable fast-xml-parser from reconciliation lambda#9765
eliotlim wants to merge 1 commit into
developfrom
fix/deps-recon-fast-xml-parser

Conversation

@eliotlim

Copy link
Copy Markdown
Contributor

Problem

Critical Dependabot alert #828 (GHSA-m7jm-9gc2-mpf2 — fast-xml-parser entity-encoding bypass via regex injection in DOCTYPE entity names, patched in 4.5.4) against services/form-payment-reconciliation/pnpm-lock.yaml.

That standalone lockfile pinned @aws-sdk/core@3.576.0, which depends directly on the vulnerable fast-xml-parser@4.2.5. (The alert was explicitly deferred in #9764.)

Solution

Regenerate the service's standalone lockfile within its existing caret ranges (@aws-sdk/client-secrets-manager ^3.529.1, @aws-sdk/client-ssm ^3.525.0). This resolves both clients to 3.1087.0 — the same versions the main app already runs — where @aws-sdk/core no longer depends on fast-xml-parser at all, so the vulnerable package (and its strnum dep) is removed from the tree entirely.

  • package.json specifiers are unchanged, so the root workspace lockfile stays in sync (root pnpm install --frozen-lockfile remains green).
  • The lockfile shrinks (955 deletions) because modern aws-sdk v3 is more modular.

Breaking Changes

  • Yes
  • No — backwards compatible

Tests

  • pnpm install -p --frozen-lockfile --ignore-workspace (standalone deploy path) — passes.
  • pnpm install --frozen-lockfile (root workspace) — passes; package.json untouched so no desync.
  • git diff confirms fast-xml-parser@4.2.5 + strnum@1.0.5 removed, no other vulnerable transitives introduced.

Runtime risk

None. The Lambda (index.js) uses only SSMClient / GetParameterCommand, which are stable across all of aws-sdk v3.

Not addressed

decompress (critical, alert #1006) remains open by request — no upstream patch exists (latest 4.2.1 is the vulnerable version), and it's a dev-only transitive of the Serverless CLI deploy tooling with no untrusted-archive path.

🤖 Generated with Claude Code

The service's standalone pnpm-lock.yaml pinned @aws-sdk/core@3.576.0,
which depends directly on fast-xml-parser@4.2.5 — flagged critical by
Dependabot (GHSA-m7jm-9gc2-mpf2, entity-encoding bypass via regex
injection in DOCTYPE entity names; patched in 4.5.4).

Regenerating the standalone lockfile within the existing caret ranges
resolves the aws-sdk clients to 3.1087.0 — the same versions the main
app already runs — where fast-xml-parser is no longer a dependency, so
the vulnerable package is removed from the tree entirely. package.json
specifiers are unchanged, so the root workspace lockfile stays in sync.

The Lambda only uses SSMClient/GetParameterCommand, stable across all of
aws-sdk v3, so the resolution bump carries no runtime risk.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@eliotlim
eliotlim requested review from a team and Copilot July 16, 2026 09:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • services/form-payment-reconciliation/pnpm-lock.yaml: Generated file

@kevin9foong

Copy link
Copy Markdown
Contributor

lgtm - lets redploy the lambda to issue the patch

@mergify

mergify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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.

3 participants