Skip to content

Conversation

@cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Jan 30, 2026

Description

Reason: fast-xml-parser 4.x (pulled in by @metamask/snaps-utils) is vulnerable to a RangeError DoS (GHSA-37qj-frw5-hhjh).

fast-xml-parser Changelog

The only breaking change in v5 is the ESM support

Solution: Add a resolution to fast-xml-parser ^5.3.4 and add it to npmPreapprovedPackages so the safe version can be installed despite the minimal age gate.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Screenshots/Recordings

N/A (dependency upgrade).

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Dependency upgrade plus LavaMoat policy updates could cause runtime/build regressions if @metamask/snaps-utils expects v4 behavior or if the new globals aren’t correctly captured.

Overview
Upgrades fast-xml-parser to ^5.3.4 via package.json resolutions (and updates yarn.lock, including strnum to ^2.1.0) to address GHSA-37qj-frw5-hhjh.

Refreshes LavaMoat policies: removes the @metamask/snaps-utils>fast-xml-parser allowlist entry from Browserify policies, and updates Webpack MV2 policies to allow the new fast-xml-parser access pattern (exports.isExist) instead of the old entityName/val globals.

Written by Cursor Bugbot for commit 57261b8. This will update automatically on new commits. Configure here.

- Add resolution in package.json for fast-xml-parser ^5.3.4
- Add fast-xml-parser to npmPreapprovedPackages for minimal age gate; remove once satisfied
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-core-platform Core Platform team label Jan 30, 2026
@cryptodev-2s cryptodev-2s self-assigned this Jan 30, 2026
@cryptodev-2s cryptodev-2s changed the title Upgrade fast-xml-parser to 5.3.4 (GHSA-37qj-frw5-hhjh) chore: Upgrade fast-xml-parser to 5.3.4 (GHSA-37qj-frw5-hhjh) Jan 30, 2026
@cryptodev-2s cryptodev-2s changed the title chore: Upgrade fast-xml-parser to 5.3.4 (GHSA-37qj-frw5-hhjh) chore: Upgrade fast-xml-parser to 5.3.4 (GHSA-37qj-frw5-hhjh) Jan 30, 2026
@cryptodev-2s cryptodev-2s marked this pull request as ready for review January 30, 2026 21:08
@cryptodev-2s cryptodev-2s requested a review from a team as a code owner January 30, 2026 21:08
mikesposito
mikesposito previously approved these changes Jan 30, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 30, 2026

Builds ready [e953db8]
UI Startup Metrics (1293 ± 106 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--12931057165010613411466
load--1114888144210611751312
domContentLoaded--1107886143810711681304
domInteractive--261594172371
firstPaint--164641228182187319
backgroundConnect--22821027611231255
firstReactRender--16102941723
initialActions--106113
loadScripts--89467612211079521092
setupStore--1263551621
numNetworkReqs--211582171573
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--264816628447124126105264
load--1160995164915112091543
domContentLoaded--1140983162414411781525
domInteractive--40202393140117
firstPaint--231811576199258394
backgroundConnect--74929436228555693070
firstReactRender--25165272842
initialActions--105112
loadScripts--89074213011279341204
setupStore--1665671829
numNetworkReqs--1275526950162241
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--8466631118979151012
load--69659792283765877
domContentLoaded--69159291583759872
domInteractive--251694182277
firstPaint--1055834257124211
backgroundConnect--3918120244695
firstReactRender--15103861630
initialActions--103112
loadScripts--68859091382756870
setupStore--1153051126
numNetworkReqs--221584181675
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1264864254828214401703
load--71361010401087251013
domContentLoaded--70360610331087151006
domInteractive--36171862836112
firstPaint--155641020126187439
backgroundConnect--16012962463158313
firstReactRender--23163542431
initialActions--104111
loadScripts--7016041024106713996
setupStore--1242941420
numNetworkReqs--1495035957171276
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14381127196419615701906
load--1155961176015812251601
domContentLoaded--1154957175915812251601
domInteractive--68342634395137
firstPaint--------
backgroundConnect--68242064888184
firstReactRender--13103841320
initialActions--103122
loadScripts--1118947173513911811431
setupStore--176206321176
numNetworkReqs--231286181975
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--28621922811773130603538
load--13391109245227413681979
domContentLoaded--13391109245227413671978
domInteractive--156481344158149435
firstPaint--------
backgroundConnect--41512530954035111073
firstReactRender--22146782331
initialActions--213123
loadScripts--12601075240821512811621
setupStore--14813779186160678
numNetworkReqs--86362334798206
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--17061387337526217932158
load--14541205302321115111717
domContentLoaded--14531204302121115111716
domInteractive--863025347131156
firstPaint--------
backgroundConnect--65262524280144
firstReactRender--14102321518
initialActions--103122
loadScripts--14181184292319714731630
setupStore--2042293912122
numNetworkReqs--231284171872
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29352075801765930543855
load--15221258255924016442010
domContentLoaded--15221258255924016442010
domInteractive--13733561123125490
firstPaint--------
backgroundConnect--3441201596266394980
firstReactRender--23156072530
initialActions--203123
loadScripts--14761240252822215971869
setupStore--1566823207211727
numNetworkReqs--82392244790210
19--------
📊 Page Load Benchmark Results

Current Commit: e953db8 | Date: 1/30/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.08s (±131ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 749ms (±155ms) 🟢 | historical mean value: 717ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 92ms (±130ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.08s 131ms 1.03s 2.21s 1.29s 2.21s
domContentLoaded 749ms 155ms 700ms 2.16s 951ms 2.16s
firstPaint 92ms 130ms 60ms 1.38s 100ms 1.38s
firstContentfulPaint 92ms 130ms 60ms 1.38s 100ms 1.38s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 2 Bytes (0%)
  • common: 899 Bytes (0.01%)

@Gudahtt
Copy link
Member

Gudahtt commented Jan 30, 2026

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/experimental/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/flask/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/webpack/mv2/beta/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv2/experimental/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv2/flask/policy.json changes differ from mv2/main/policy.json policy changes
✅ lavamoat/webpack/mv3/beta/policy.json changes match mv3/main/policy.json policy changes
✅ lavamoat/webpack/mv3/experimental/policy.json changes match mv3/main/policy.json policy changes
✅ lavamoat/webpack/mv3/flask/policy.json changes match mv3/main/policy.json policy changes

@metamaskbot metamaskbot requested a review from a team as a code owner January 30, 2026 21:59
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 30, 2026

✨ Files requiring CODEOWNER review ✨

📜 @MetaMask/policy-reviewers (8 files, +4 -44)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +0 -9
      • 📁 experimental/
        • 📄 policy.json +0 -9
      • 📁 flask/
        • 📄 policy.json +0 -9
      • 📁 main/
        • 📄 policy.json +0 -9
    • 📁 webpack/
      • 📁 mv2/
        • 📁 beta/
          • 📄 policy.json +1 -2
        • 📁 experimental/
          • 📄 policy.json +1 -2
        • 📁 flask/
          • 📄 policy.json +1 -2
        • 📁 main/
          • 📄 policy.json +1 -2

Tip

Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers.

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

LGTM!

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 30, 2026

Builds ready [57261b8]
UI Startup Metrics (1320 ± 107 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13201103154310713961500
load--1118903135410311861262
domContentLoaded--1112894134810211791257
domInteractive--261780152470
firstPaint--158681090118198297
backgroundConnect--23721830716240277
firstReactRender--18104252029
initialActions--105113
loadScripts--89068811261039641037
setupStore--1263451523
numNetworkReqs--211578171570
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--20621612491652720672849
load--1098945193715511311475
domContentLoaded--1079933192215011001424
domInteractive--37181882936102
firstPaint--232811590267240671
backgroundConnect--4222813415409350691
firstReactRender--22154552434
initialActions--104112
loadScripts--84271615951358631148
setupStore--1563361826
numNetworkReqs--85471903995176
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--8216671196948651004
load--67559892265725805
domContentLoaded--67059591564720798
domInteractive--2615119202282
firstPaint--1056129849128209
backgroundConnect--42181492850114
firstReactRender--16103561829
initialActions--105113
loadScripts--66859390663716790
setupStore--1153751225
numNetworkReqs--221586181575
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1261864180922714111739
load--70259312021247111051
domContentLoaded--69358611801237011037
domInteractive--3217124223189
firstPaint--149681044125184288
backgroundConnect--17413839344178286
firstReactRender--23163942532
initialActions--103111
loadScripts--69058411721226991030
setupStore--1253441418
numNetworkReqs--1054831055131226
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14721166202817915811869
load--1176983177411812511381
domContentLoaded--1176980177411812471381
domInteractive--793436553102165
firstPaint--------
backgroundConnect--65272324377169
firstReactRender--14104261436
initialActions--103112
loadScripts--1143968174511212041336
setupStore--155103171144
numNetworkReqs--231285191880
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27951993825292028494055
load--13221039246233212852194
domContentLoaded--13221038246233212842193
domInteractive--141381420158136370
firstPaint--------
backgroundConnect--3751245415584309974
firstReactRender--21147272230
initialActions--213123
loadScripts--12621017243729212612104
setupStore--14991105193166600
numNetworkReqs--76362084199176
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16101336221217816771985
load--13911154196214914541681
domContentLoaded--13901154196214914541681
domInteractive--812918739111139
firstPaint--------
backgroundConnect--742626152110180
firstReactRender--13102221419
initialActions--103112
loadScripts--13441128184613314111642
setupStore--153227271049
numNetworkReqs--221284161873
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--28001991387342430163588
load--15081181240024316342126
domContentLoaded--15071181240024316342125
domInteractive--1063246877109279
firstPaint--------
backgroundConnect--2941031158222313854
firstReactRender--22155882633
initialActions--218123
loadScripts--14511161226021615471968
setupStore--1478818200144661
numNetworkReqs--73362274392180
19--------
📊 Page Load Benchmark Results

Current Commit: 57261b8 | Date: 1/30/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±43ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 740ms (±39ms) 🟢 | historical mean value: 717ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 80ms (±11ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 43ms 1.03s 1.37s 1.07s 1.37s
domContentLoaded 740ms 39ms 717ms 1.03s 750ms 1.03s
firstPaint 80ms 11ms 64ms 172ms 88ms 172ms
firstContentfulPaint 80ms 11ms 64ms 172ms 88ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 2 Bytes (0%)
  • common: 899 Bytes (0.01%)

@cryptodev-2s cryptodev-2s added this pull request to the merge queue Jan 30, 2026
Merged via the queue into main with commit 1b0fd13 Jan 30, 2026
337 of 339 checks passed
@cryptodev-2s cryptodev-2s deleted the upgrade/fast-xml-parser branch January 30, 2026 22:50
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2026
@metamaskbot metamaskbot added the release-13.18.0 Issue or pull request that will be included in release 13.18.0 label Jan 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.18.0 Issue or pull request that will be included in release 13.18.0 size-XS team-core-platform Core Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants