Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/security/security-fixes.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Starting point (measured 2026-08-13 on `main`): **61 total — 4 critical, 19 hi
What the bump actually resolved, against the four allowlisted highs it was filed to clear:

- **Cleared (2):** both `postcss` advisories — `GHSA-6g55-p6wh-862q` (arbitrary file read via `sourceMappingURL`) and `GHSA-r28c-9q8g-f849` (path traversal via source-map auto-loading). They lived in the copy nested under `@expo/metro-config`, which SDK 57 no longer pins to a vulnerable version. Both entries are **deleted** from `scripts/npm-audit-allowlist.json`.
- **Not cleared (2):** both `image-size` advisories — `GHSA-w3rx-r6r6-pgpr` and `GHSA-5p2g-fcmc-qvqq`. **These have no upstream fix at any version:** the advisories cover `<=2.0.2` and `2.0.2` is the newest published release, while `metro` requires `image-size: ^1.0.2` in both `0.84.4` (shipped via `@expo/metro`) and `0.87.0` (current latest). No Expo or Metro release escapes it. Their allowlist entries are **kept**, with the reason text corrected — it previously claimed "fix requires the Expo SDK 57 major upgrade", which this upgrade disproved — and re-pointed to **#923**, which carries the policy decision. `expires` was deliberately left at 2026-11-15: failing closed is what forces a human to make that call.
- **Not cleared (2):** both `image-size` advisories — `GHSA-w3rx-r6r6-pgpr` and `GHSA-5p2g-fcmc-qvqq`. **These have no upstream fix at any version:** the advisories cover `<=2.0.2` and `2.0.2` is the newest published release, while `metro` requires `image-size: ^1.0.2` in both `0.84.4` (shipped via `@expo/metro`) and `0.87.0` (current latest). No Expo or Metro release escapes it. Their allowlist entries are **kept**, with the reason text corrected — it previously claimed "fix requires the Expo SDK 57 major upgrade", which this upgrade disproved — and re-pointed to **#923**, which carries the policy decision. `expires` was deliberately left at 2026-11-15: failing closed is what forces a human to make that call. **Corrected 2026-11-04 (#923):** a fix landed four days later. Metro 0.84.5 (2026-08-19) dropped `image-size`, and SDK 57's `@expo/metro` range already reaches it, so a lockfile re-resolve cleared both advisories and the entries are deleted. How: the 2026-11-04 note under [npm audit sweep + CI gate](#npm-audit-sweep--ci-gate-831-290-618).

Two gotchas worth not re-learning:

Expand All @@ -140,6 +140,8 @@ Two gotchas worth not re-learning:

When the gate goes red on a PR that did not touch dependencies, read the **exit code** before anything else. **Exit 2 means no report was obtained** — nothing has been established about the lockfile either way, and the gate's own message says whether re-running can help. **Only exit 1 is a finding.** (Before #1638 both were exit 1, so a registry outage read as an advisory report — twice, blocking two merges.) On exit 1, a new advisory was published upstream against the existing lockfile: fix it in-range if `npm audit fix`/`npm update <pkg>` can (see the #245/#684/#291 playbooks above), otherwise file or link the tracking issue and add a time-boxed allowlist entry in the same PR. Never widen an entry beyond the single GHSA id, and never land an entry without a tracking issue. The gate only fires on PR/push activity, so advisories against an untouched lockfile surface on the next PR — Dependabot (#848) is the tracked complement for proactive detection and bumps.

> **2026-11-04 (#923).** Both `image-size` highs (GHSA-w3rx-r6r6-pgpr, GHSA-5p2g-fcmc-qvqq) cleared without an Expo upgrade, and their allowlist entries are deleted. Metro 0.84.5 (2026-08-19, facebook/metro#1860) replaced `image-size` with vendored parsers, and `@expo/metro` 56.0.1 and later ship it, inside `expo@57.0.13`'s `~56.0.0` range. #923's 2026-10-08 triage checked only Metro 0.87.1. `npm update @expo/metro --package-lock-only` alone isn't enough: the Metro packages pin one another exactly, so it nests a second Metro 0.84.5 under `@expo/metro` beside the hoisted 0.84.4, and `npm dedupe` stops on the TypeScript 6/7 peer split. What worked, with the pinned npm: delete the hoisted `metro*`, `ob1` and `image-size` entries from the lockfile (keep `@expo/metro`), then `npm update @expo/metro --package-lock-only`. That places one hoisted 0.84.5 family, which also serves `@react-native/community-cli-plugin` (`^0.84.3`) and Sentry's optional `metro` peer. Deleting the `@expo/metro` entry too leaves Metro out of the lockfile altogether, because npm doesn't re-resolve a locked package's missing dependencies. Lockfile drift was the Metro family (0.84.4 to 0.84.5), `@expo/metro` (56.0.0 to 56.0.2), metro's nested `negotiator` (1.0.0 to 1.1.0) and a new nested `content-type`; `image-size` and its `queue` dependency are gone. `expo export` gave the same module count (3,748 Android, 3,667 iOS), the same chunk hash and identical asset maps, dimensions and file hashes included, on both versions, so the vendored parsers size the app's images exactly as `image-size` did. The Hermes bytes differ between any two exports, even on one Metro version, so compare the chunk hash, not the `.hbc` file. `npm audit`: 64 to 63 findings, high 6 to 5.

> **2026-11-03 (#3337).** Nineteen unallowlisted highs and criticals against an untouched lockfile, red on every PR since about 2026-10-21, plus the expired `node-forge` entry. Seventeen cleared without a major. `next` (two criticals: GHSA-2464-fhr4-w9xw, an RCE in Image Optimization through `sharp` on glibc Linux, and GHSA-673q-mjm6-r5xr, an RCE in `use cache` functions returning typed arrays; plus the high GHSA-p3m5-59mp-jv5r; all `<=16.4.0`, patched 16.4.1) moved to 16.4.4 by raising the `apps/web` and `apps/landing` pins to `^16.4.4` and `npm update next --package-lock-only`, which re-resolved the one hoisted copy and all 8 `@next/swc-*` entries without the entry deletion #291 needed. Neither RCE was reachable before the bump: the root `sharp` pin was already 0.35.5, the advisory's stated workaround, and no app uses `use cache` or `cacheComponents`. `packages/validation`'s `zod` floor moved to `^4.6.7`. Three overrides moved: `node-forge` `^1.4.2` (1.4.2 clears all six node-forge highs, including the expired #3134 entry), `undici` `>=7.30.1 <8.0.0`, and `multer` `2.5.0` (`@nestjs/platform-express` 11.2.8, its newest 11.x, still pins `2.4.0` exactly). `dompurify` 3.4.17, `body-parser` 2.4.0 and `vite` 8.3.5 moved in range with `npm update`. Lockfile drift was those packages plus their own dependencies (under `vite`: `rolldown`, its bindings and `@oxc-project/types`, vite's nested `postcss`, and the hoisted `nanoid` postcss uses; under `body-parser`: `qs`, `iconv-lite` and `side-channel`). The withdrawn `braces` advisory (#3201) and the fixed `node-forge` one were pruned. Two stay allowlisted until 2026-12-15: `decode-uri-component` GHSA-qr28-fpjm-wq7f, whose only fix (0.5.1) is ESM-only while `query-string@7` from `expo-router@57` `require()`s `^0.2.2`, so it waits for the Expo SDK 58 upgrade (#2329); and `zod` GHSA-mrhx-c7xc-m3w5, for the root `zod@3.25.76`, which has no 3.x fix and serves `@expo/cli` and ESLint tooling. `@expo/cli` 58.1.19 drops zod, so the SDK 58 upgrade (#2329) clears both entries. The gate matches by GHSA id, so the zod entry would also hide a regression of `packages/validation`'s runtime copy below 4.6.6; its `^4.6.7` floor is what holds that copy.

> **2026-10-07.** Two new criticals and two new highs against an untouched lockfile, red on every open PR. Three cleared in range with `npm update <pkg> --package-lock-only` and the pinned npm, nothing else moving: `proxy-addr` `GHSA-jqcg-44mw-7w3h` (critical, `<2.0.8`; express's `^2.0.7`, so on the API's runtime path) to 2.0.8, `compression` `GHSA-vc2v-76pw-4v95` (high, `<1.8.2`; `@expo/cli`'s `^1.7.4`) to 1.8.2, and `source-map-js` `GHSA-68fv-2mgg-jv7q` (high, `>=1.0.0 <1.2.2`; postcss, `@tailwindcss/node`, `css-tree` and `magicast`, all `^1.2.1`) to 1.2.2. `shell-quote` `GHSA-pqg4-j6r4-53mv` (critical, `>=1.8.4 <1.11.0`) needed a root override, `"shell-quote": "^1.11.0"`, because `concurrently` pins `1.9.0` exactly and 10.0.5, its newest release, still does; the other consumer, `react-devtools-core`, takes `^1.6.1`. One hoisted 1.12.0 now serves both. Dependabot never cleans up a transitive override, so dropping it once a `concurrently` release declares a fixed `shell-quote` is tracked by #3211. No allowlist entry.
Expand Down
Loading
Loading