Skip to content

Update the vendored RequireJS to 2.3.8. - #10731

Open
dpage wants to merge 1 commit into
pgadmin-org:masterfrom
dpage:vendor-requirejs-2.3.8
Open

dpage wants to merge 1 commit into
pgadmin-org:masterfrom
dpage:vendor-requirejs-2.3.8

Conversation

@dpage

@dpage dpage commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Updates the vendored RequireJS from 2.3.6 to 2.3.8 to fix CVE-2024-38999 (GHSA-x3m3-4wpv-5vgc), a prototype pollution flaw in require.config().

The only functional upstream change between the two versions is a guard in eachProp() that skips the __proto__ and constructor keys. pgAdmin's earlier SonarQube clean-ups to require.js are carried forward unchanged, and require.min.js (loaded by base.html when DEBUG is off) has been regenerated from it with uglify-js.

Checked in a Node vm sandbox: the old require.min.js lets require.config() pollute Object.prototype, whilst both new files do not and still define and load modules normally.

Summary by CodeRabbit

  • Chores
    • Updated the app’s bundled module-loading component to a newer version.
    • This maintenance update changes internal handling of module properties and script metadata. No changes to the app’s visible features or workflows are described, and no new end-user functionality is noted.

RequireJS 2.3.6 is affected by CVE-2024-38999 (GHSA-x3m3-4wpv-5vgc), a
prototype pollution flaw in require.config(). The fix, which skips the
'__proto__' and 'constructor' keys when merging configuration objects, is
the only functional change between 2.3.6 and 2.3.8.

pgAdmin's local SonarQube clean-ups to require.js (renamed shadowed
variables, an optional chain and a comment in an empty function) are
carried forward unchanged. require.min.js, which base.html loads when
DEBUG is off, has been regenerated from the updated require.js with
uglify-js, as no upstream minified 2.3.8 build matches the previous one.
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The vendored RequireJS file updates its version from 2.3.6 to 2.3.8. The update also changes eachProp to skip own properties named __proto__ and constructor, and uses optional chaining to access the script node’s data-requiremodule attribute.

Changes

RequireJS update

Layer / File(s) Summary
Version and property iteration
web/pgadmin/static/vendor/require/require.js
The license header and runtime version now identify RequireJS 2.3.8. eachProp skips own properties named __proto__ and constructor.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: Minimal · up to f71ea

The RequireJS update is mergeable; the changed runtime behavior aligns with the stated objective and supported browser target.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: updating the vendored RequireJS dependency to version 2.3.8.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 230749e and f71ea8b.

Files ignored due to path filters: 1
  • web/pgadmin/static/vendor/require/require.min.js is excluded by !**/*.min.js
Files selected for processing: 1
  • web/pgadmin/static/vendor/require/require.js

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

This branch has not been deployed

No deployments
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