Skip to content

Update jQuery UI to 1.13.3 for CVE-2022-31160 (#257) - #261

Merged
danielplohmann merged 3 commits into
masterfrom
fix/jquery-ui-cve-2022-31160
Oct 24, 2026
Merged

danielplohmann merged 3 commits into
masterfrom
fix/jquery-ui-cve-2022-31160

Conversation

@r0ny123

@r0ny123 r0ny123 commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

static/jquery-ui.js and jquery-ui.css, which base.html:31,36 loads on every page, were jQuery UI 1.13.1. That release has CVE-2022-31160 (#257): a checkboxradio widget reads its label's escaped text back as HTML on refresh. This replaces both with 1.13.3, the last 1.13.x, taken unmodified from the npm package (dist/jquery-ui.js, the same full build as before, and dist/themes/base/jquery-ui.css).

How exposed we were. MCRITweb creates no checkboxradio, so no page of ours reached the flaw. The only jQuery UI widget the app calls is the sortable sample order on the cross compare result (result_cross.html:72); the .tooltip() in table/links.html:63 resolves to Bootstrap's plugin, which registers after jQuery UI. So this is the library on every page being a known-vulnerable version, not a live hole.

What else moved from 1.13.1 to 1.13.3. Besides the checkboxradio fix: resizable with box-sizing: border-box, selectmenu respecting hidden options, and the dialog focus workaround covering jQuery 3.6. None of those widgets are used here. The CSS differs from the old file in one rule: the old copy came from the download builder, which writes opacity: .003 for .ui-widget-overlay instead of .3; that only matters for modal dialogs, which we don't have. The theme references six icon sprites and only one was ever committed, as before; nothing here uses the others, so they're not added.

Verification.

check 1.13.1 1.13.3
escaped <img onerror> in a checkboxradio label, after refresh runs stays text
live app, a cross compare result's sortable list (20 entries): drag the first below the third order 9,11,13,15,…, "Change order" → ?custom=9,11,13,15,17,… identical
copy button tooltip, family type-ahead (standalone page with the app's own code) works identical
console errors none none
  • The live check ran against mcrit 1.13.0 with the 1.9.0-era test corpus (66 samples), master and this branch side by side; a console sweep over one page of every kind showed no JS errors or failed requests.
  • ruff check . is clean; python -m pytest gives 1258 passed, 7 skipped. The 7 are the Playwright tests, which load the real pages through base.html; with Playwright available all 39 tests in testFunctionVsBrowser.py and testAutocompleteEscaping.py pass.

Relation to open PRs. #126 and #245 move the jQuery UI tags from base.html to result_cross.html, by the same file names, so they pick this up unchanged; a trial merge with either conflicts only in jobs.html, which both already conflict in with master since batch C2; #245's testPageAssets.py and testAssetDiet.py pass with the new files (38 passed). The sizes they quote were measured on 1.13.1; 1.13.3 is 619 bytes larger (529,681 against 529,062), so their figures stay right to the KB.

This is the first of four stacked PRs from the same robustness pass (#257, #258, #259, #260); the others build on this branch.

Closes #257.

base.html loads static/jquery-ui.js and static/jquery-ui.css on every
page, and both were jQuery UI 1.13.1. That release is affected by
CVE-2022-31160: checkboxradio reads its label's text nodes back as HTML
on refresh, so a label holding escaped markup turns into live markup.
1.13.2 fixed it; 1.13.3 is the last 1.13.x release.

Both files are replaced with the unmodified dist files from the
jquery-ui 1.13.3 npm package: the full build (same component list as
before) and the base theme. The JS diff beyond the version bump is the
checkboxradio fix plus small fixes to resizable, selectmenu and the
dialog focus workaround for jQuery 3.6. The CSS differs from the old
file only in the overlay opacity: the old copy came from the download
builder, which wrote .003 instead of .3 for .ui-widget-overlay. Nothing
here opens a jQuery UI dialog, so that rule is unused today.

The theme references six icon sprites, of which only ui-icons_444444 was
ever committed; that was already so with 1.13.1 and nothing here uses the
other five, so they are not added.

The app itself only calls .sortable() on the cross-comparison sample
list; the .tooltip() call in clipboard_js resolves to Bootstrap's
plugin, which is registered after jQuery UI's. A browser check of both
(drag-reordering plus changeorder(), and the copy button tooltip) and
of the family type-ahead behaved the same with 1.13.1 and 1.13.3, with
no console errors. The same check confirms the CVE: an escaped
<img onerror> in a checkboxradio label runs after refresh with 1.13.1
and stays text with 1.13.3. pytest and ruff pass.
The README conflict is the version history: master folded the older
unreleased lines into its 1.6.0 entry, so only this branch's own line
stays above it.
r0ny123 added a commit that referenced this pull request Oct 24, 2026
#261 replaces the full build with 1.13.3 for CVE-2022-31160, and the
committed cut is checked against whatever full build is vendored. With
#261 merged in, the cut is regenerated from 1.13.3, so the branch stays
green whichever of the two merges first. Of the kept modules only the
banners, version strings and links differ.
@danielplohmann
danielplohmann merged commit 3a34402 into master Oct 24, 2026
8 checks passed
danielplohmann added a commit that referenced this pull request Oct 24, 2026
r0ny123 pushed a commit to r0ny123/mcritweb that referenced this pull request Oct 30, 2026
Bumps setup.py and adds the version history entry, folding in the five
"unreleased" lines (familiary#263, familiary#262, familiary#261, familiary#293, familiary#254).

48 PRs since 1.6.0: batches C1 (familiary#298), C2 (familiary#299), security E (familiary#318),
UI F (familiary#339) and fixes G (familiary#340). No dependency changes.

The entry leads with the three things that affect existing deployments:
instance/ backups under WAL mode, the bounded result cache, and the
optional retirement of pre-1.5.0 API tokens.

Test count measured on the batch G tree, which master 30cbc8a is
identical to: 2428 passed, 19 skipped against mcrit 1.16.0, 2447
collected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HERmVhHo4ibp7HSTXr3Ya8
@r0ny123
r0ny123 deleted the fix/jquery-ui-cve-2022-31160 branch October 30, 2026 06:06
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.

The vendored jQuery UI is 1.13.1, which has CVE-2022-31160

2 participants