← All work

Eleven security fixes across five apps · Oct 2024 – Oct 2026

Two years of security fixes across five apps

Security work on a frontend is rarely one big fix. It’s a steady stream of alerts, most of them in code nobody on the team wrote. Over two years I handled eleven of them across five apps, and each taught me something different about where vulnerabilities hide and what a real fix looks like.

Role
Frontend engineer
When
Oct 2024 – Oct 2026
Where
PayGlocal
Stack
npmNext.jsnginxDockerDependabot

The situation

Our apps share the same exposure as most JavaScript apps: hundreds of packages, most of them pulled in by other packages, plus a web server and a build tool that sit outside “the code”. Alerts arrive from Dependabot, security tickets and vulnerability assessments. Some apply directly, some only on a server, some can’t be fixed by upgrading at all. Treating them all as “bump the version” would have missed half of them.

What I built

  • Patched an HTML sanitiser with a published XSS bypass, then removed it from the checkout altogether.
  • Forced fixes for packages we never installed directly, first by pinning, later with npm overrides.
  • Moved a Next.js dashboard through a December 2025 run of Server Components advisories, and checked that the lockfile resolved to the release with the complete fix.
  • Upgraded an HTTP client in steps and sorted its advisories into ones that affect a browser app and ones that only matter on a server.
  • Switched the console’s nginx to the vendor’s mainline repository, pinned it, and made the Docker build fail on an older version.
  • Migrated an app off an unmaintained build tool whose alerts couldn’t be fixed in place (on a branch, awaiting testing).
  • Pinned both checkouts to one reviewed lockfile and one private registry, and added username allowlists to sensitive finance pages.
Try it

Every fix, by where it lived

  1. Aggregator checkoutLibraries we use
    HTML sanitiser with an XSS bypass

    Patched DOMPurify 3.1.0 → 3.1.3 (CVE-2024-45801).

    What I learned →
  2. Aggregator checkoutLibraries we use
    The same sanitiser, gone

    Removed DOMPurify entirely during the bundle work. Its future advisories no longer apply.

    What I learned →
  3. Both checkoutsPackages we never installed
    Versions drifting between apps and registries

    Pinned dependencies to one reviewed lockfile, installed from a single private registry.

  4. Merchant dashboardPackages we never installed
    Predictable multipart boundaries, deep in the tree

    Forced form-data ≥ 4.0.4 under axios (CVE-2025-7783).

    What I learned →
  5. Merchant dashboardFramework
    Server Components: denial of service and source exposure

    Next.js 15.5.7 → 15.5.9, the release with the complete fix (CVE-2025-55184, -55183, -67779).

    What I learned →
  6. Legacy operations consoleBuild tool
    Alerts in an unmaintained build tool

    Migrated Create React App to Rsbuild and React 18 on a branch, awaiting full testing.

    What I learned →
  7. Merchant dashboardProcess
    An audit gate that blocked everyone

    Narrowed npm audit to high and production, then took it out of pre-commit. It belongs in CI.

    What I learned →
  8. Legacy operations consoleLibraries we use
    HTTP client advisories

    axios 1.7.9 → 1.16.0 in steps, with follow-redirects (e.g. CVE-2025-27152).

    What I learned →
  9. Legacy operations consoleWeb server
    nginx lagging behind its fixes

    Installed from nginx’s mainline repository, pinned, and made the build fail on older versions.

    What I learned →
  10. Merchant dashboardPackages we never installed
    A batch of framework and image-library alerts

    Next.js 15.5.18 → 15.5.22, postcss, and overrides for sharp and brace-expansion.

    What I learned →
  11. New operations consoleAccess
    Finance pages open to anyone with the role

    Per-environment username allowlists on top of permissions, carried over from the legacy tool.

Decisions

Remove before you patch

Every package is a subscription to its future advisories. When an alert arrives, the first question is whether the code still needs to exist. Deleting the sanitiser closed that line of alerts for good.

Trust the lockfile, not the manifest

The manifest says what you’ll accept; the lockfile says what runs. After every security bump I check the resolved version against the advisory’s fixed list.

Turn “we’re on a safe version” into a build failure

The web server isn’t in package.json, so nothing flagged it. A version check in the build makes an old nginx impossible to ship silently.

Put gates where they judge the change

An npm audit in pre-commit failed on new advisories, not on what people changed, so it got switched off. Audits belong on a schedule and in CI on dependency changes.

Outcome

WhatBeforeAfterDetail
Security fixes11across 5 apps
Layers involved7not just npm
Write-ups7one per lesson

What I learned

↑↓ move↵ openesc close