Skip to content

chore(mobile): patch XML parser security in plist tooling - #19380

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/neil-mobile-xml-dep-update
Sep 8, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/neil-mobile-xml-dep-update

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​9 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9 0

Ready for review. Final validation evidence: 4,204 mobile tests and 15 Ruby release-tooling tests pass in CI; all three local production exports and actual plist/security checks pass.

ELI5

Update only the two transitive XML parsers used by mobile plist tooling: @xmldom/xmldom 0.8.13 → 0.8.15 and 0.9.10 → 0.9.12. This closes the creation-time EntityReference injection vector in GHSA-6gmq-8vp8-gcm6. Mobile audit findings decrease from 5 to 3.

What Changed

Only mobile/pnpm-lock.yaml: both maintained xmldom patch lines, with registry integrity hashes. Expo plist 0.5.3/0.5.4 and plist 3.1.1 retain their existing compatible dependency ranges. No Expo, React Native, native module, protocol or application code changes.

Why / safety assessment

Upstream 0.8.15 and 0.9.12 reject invalid names at createEntityReference() and validate mutated names when well-formed serialization is requested. Ordinary plist values, nested dictionaries, arrays, booleans, numbers, Unicode and escaped XML text are covered by actual consumer roundtrips.

This is defense in depth for tooling, not a claim of an exposed Orca exploit. Serializer protection for a subsequently mutated nodeName remains opt-in: 0.8 uses serializeToString(node, false, undefined, {requireWellFormed:true}); 0.9 uses serializeToString(node, {requireWellFormed:true}). The creation-time check is automatic. Both forms were exercised against installed packages.

Remaining audit findings are two image-size advisories with no published patched version and decode-uri-component requiring a separate 0.5 migration. They are not hidden with incompatible overrides.

Testing

Local macOS arm64, ORCA_BACKGROUND_LAUNCH=1:

  • Frozen install including terminal and Mermaid webview generation: passed.
  • pnpm --dir mobile typecheck: passed.
  • Complete mobile suite: 516 files, 4,204 passed, 3 skipped.
  • pnpm --dir mobile lint: passed.
  • expo config --type prebuild --json: passed, without writing native projects.
  • Plist roundtrip through all three actual consumers (@expo/plist 0.5.3, 0.5.4; plist 3.1.1): passed.
  • Each xmldom line rejects invalid EntityReference creation, serializes valid references, and rejects post-creation injection under its supported well-formed API: 6 assertions passed.
  • git diff --check: passed; exactly two resolved packages changed.
  • Audit: 5 → 3 findings, both xmldom findings removed.

CI and all-platform JS export evidence is linked above. No native device/emulator run is claimed; no native dependency changes.

Linked Issue

User-requested dependency security review.

Visual Proof

N/A — lockfile-only tooling update.

Review

Independent of the desktop, cloud, Electron and editor dependency PRs. No SSH, folder workspace, remote-wire or provider behavior changes.

@OrcaWin

OrcaWin commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Local validation complete for 9da8dbe:

  • Frozen install and both webview engine builds passed.
  • 4,204 tests passed, 3 skipped, 516 files passed; typecheck and lint passed.
  • Expo prebuild-config evaluation passed without changing native projects.
  • Production JS exports for iOS, Android and web all passed, including iOS/Android Hermes bytecode bundles.
  • Roundtrip through @expo/plist 0.5.3, @expo/plist 0.5.4 and plist 3.1.1 passed for escaped XML, Unicode, arrays and nested values. Parsed dictionary prototypes differ across existing consumers, so data comparisons normalize dictionaries; this is existing consumer behavior, not an xmldom change.
  • Both xmldom versions passed creation/serialization security regression assertions using their documented API signatures.
  • Audit findings decreased 5 → 3. Native dependencies unchanged; no device/emulator testing is claimed for this plist-tooling patch.

Mobile CI is pending; it also checks Ruby/fastlane release tooling on Linux. Local lockfile formatting is excluded by the existing formatter configuration; git diff --check passes.

@OrcaWin

OrcaWin commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Ready for review at 9da8dbe68b.

Mobile CI is green on Linux: 4,204 tests passed / 3 skipped / 516 files, typecheck, lint, formatting, frozen Node and Ruby installs, 15 Ruby tests / 32 assertions, and loading the real fastlane lanes. Root PR checks also passed the applicable mobile-only gates.

Together with the local iOS/Android/web production exports and real plist/security checks documented above, this supports merging the two tooling patch resolutions. No native module changes or native device test claim. Remaining audit findings are explicitly disclosed in the body.

@OrcaWin

OrcaWin commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Additional combined-candidate validation (local, macOS arm64): merged #19361, #19369, #19377, #19378, #19362, #19380 and #19382 into local commit a610eca2303d94ad02199240c0d3afc11bc1757f. Blocked Tiptap #19376 is excluded. This supplements each PR's own exact-commit tests; it does not replace pending CI.

  • Combined frozen-lockfile install, full pnpm tc and pnpm run build:electron-vite: passed.
  • Existing editor + renderer i18n suites: 1,581 passed, 2 skipped; 227 files passed, 1 skipped.
  • 11 parser/query/URI/selector/plist/XML/browser-target/ID assertions: passed.
  • 5 real React Trans rendering/interpolation/language-switch assertions: passed.
  • 6 real headless Chrome sanitizer assertions on the combined installed DOMPurify: passed.
  • Actual combined Electron 43.6.0 / Node 24.20.0: native SQLite read/write, patched PTY spawn/output/exit and filesystem watcher event all passed.

All commands used ORCA_BACKGROUND_LAUNCH=1; no visible app window was opened. The only merge conflict was adjacent package.json entries: resolve by retaining both "dompurify": "3.4.14" and "electron": "43.6.0". Lockfiles merged automatically and the combined frozen install verified consistency. Leaf PR branches remain independent and unchanged; nothing has been merged into main.

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

Verified the two new integrity hashes byte-for-byte against registry.npmjs.org, and confirmed the mobile lockfile is internally consistent (no stale 0.8.13 / 0.9.10 references remain). Both versions match the upstream patched releases for GHSA-6gmq-8vp8-gcm6. The change is lockfile-only with no runtime behavior surface.

ℹ️ Root workspace still resolves the vulnerable 0.8.13

The desktop/Electron workspace's pnpm-lock.yaml still resolves @xmldom/[email protected] via [email protected] (a build-time dependency of @electron/universal, @electron/rebuild, and @electron/windows-sign). That instance is covered by the same advisory, so the desktop dependency audit remains at its current finding count until its own bump lands. This is correctly out of scope for this mobile-only PR, but worth ensuring the desktop PR actually ships rather than being forgotten.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@OrcaWin
OrcaWin merged commit 1dae024 into main Sep 8, 2026
45 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.

1 participant