Conversation
🦋 Changeset detectedLatest commit: 5f0f856 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Changeset File Check
|
There was a problem hiding this comment.
Code Review
This pull request focuses on security improvements, dependency updates, and code cleanups. Key changes include preventing prototype pollution in deepExtend and populatePath, removing deprecated tslint configurations, updating several dependencies (such as qs and vitest), and fixing regex escaping and global replacement issues across multiple packages. Regarding the feedback, the reviewer pointed out that simplifying getParameterByName using URL.searchParams in the auth demo could break compatibility with hash-based routing query parameters, and provided a robust fallback solution.
Description
This PR resolves 33 security vulnerabilities identified in GitHub Code Scanning (CodeQL and dependency security advisories).
A new changeset has been added for
@firebase/utilto publish the prototype pollution fix:.changeset/prevent-prototype-pollution.md.Vulnerability & Alert Resolution Summary
isValidKeyonly checkedkey !== '__proto__'. Passing{"constructor": {"prototype": {...}}}traversed throughconstructorto modifyObject.prototype.constructorandprototypeinpackages/util/src/deepCopy.ts#L80. Added unit test coverage inpackages/util/test/deepCopy.test.ts#L114-L124and added new changesetprevent-prototype-pollution.md.populatePathdynamically traversed nested object properties using untrusted path segments from Data Connect extension payloads without prototype boundary checks.packages/data-connect/src/cache/cacheUtils.ts#L44-L51ifpathSegmentequals'__proto__','constructor', or'prototype'.onSecurityDebugPacket_called.replace('\n', '\nFIREBASE: '), replacing only the first newline character in multiline debug packets.replace(/\n/g, '\nFIREBASE: ')inpackages/database/src/core/PersistentConnection.ts#L1029.cloudStorageHostregex had unescaped dots in domain patterns (storage.googleapis.com), allowing spoofed domains (e.g.storageXgoogleapisYcom). Also custom host sanitization only escaped.instead of all metacharacters.storage\\.googleapis\\.com,storage\\.cloud\\.google\\.com) and applied full regex metacharacter escaping inpackages/storage/src/implementation/location.ts#L92-L104.validateOriginonly escaped dots (replace(/\./g, '\\.')) before constructing dynamic RegExp, leaving+,*,?, `testRepoInfotest helper regex/https?:\/\/(.*).firebaseio.com/had an unescaped dot beforefirebaseio.com./https?:\/\/(.*?)\.firebaseio\.com/inpackages/database/test/helpers/util.ts#L68.standalonePkg.main.replace('../', '')in Rollup build config only stripped the first../occurrence.replace(/\.\.\//g, '')inpackages/database-compat/rollup.config.js#L122.RegExpwith incomplete escaping, exposing URL parsing to regex injection and ReDoS.new URL(window.location.href).searchParams.get(name)inpackages/auth/demo/src/index.js#L1800-L1806..replace(/\.\.\//g, '')allowed crafted strings like..././to collapse into../after replacement.while (flattenedLinks.includes('../'))inscripts/docgen-compat/generate-docs.js#L90-L93.CVE-2026-27903,
CVE-2026-27904
Alert #641,
Alert #642
minimatch@9.0.3: Hard-pinned by deprecated@typescript-eslint/eslint-plugin-tslint: 7.0.2and deadtslinttoolchain.tslintplugin and dependencies fromconfig/.eslintrc.js#L15-L27andpackage.json#L74-L78, completely removing vulnerableminimatch@9.0.3fromyarn.lock.Alert #1372
vitestand@vitest/browser-playwrightto4.1.11inpackage.json#L109-L113andyarn.lock.CVE-2026-82562
Alert #1356, Alert #1357,
Alert #1358, Alert #1359,
Alert #1360, Alert #1361,
Alert #1362, Alert #1363,
Alert #1364, Alert #1365 (12 alerts)
qs<= 6.15.3.qsto6.16.0across all 5 workspace lockfiles:yarn.lock,config/functions/yarn.lock,e2e/smoke-tests/yarn.lock,packages/auth/demo/functions/yarn.lock, andpackages/rules-unit-testing/functions/yarn.lock.js-yaml< 3.15.2 polluted object prototypes.js-yaml@^3.13.1to3.15.2ine2e/smoke-tests/yarn.lock.CVE-2026-48779
Alert #1002
ws<= 8.17.1.socket.io-adapterfrom2.5.5to2.5.8(matching~2.5.2insocket.io@4.8.1), pulling securedws@8.21.3inyarn.lock.CVE-2026-69192
Alert #1206
ip-address9.x.socksfrom2.8.3to2.8.10(matching^2.8.3insocks-proxy-agent), resolving to secureip-address@10.7.0inyarn.lock.