Skip to content

fix: serve Swagger UI 5.34.1 instead of flasgger's bundled 3.28 - #751

Merged
harryjackson merged 1 commit into
masterfrom
fix/vendor-swagger-ui-5
Nov 6, 2026
Merged

harryjackson merged 1 commit into
masterfrom
fix/vendor-swagger-ui-5

Conversation

@harryjackson

Copy link
Copy Markdown
Collaborator

What changed

  • The API page at / loads Swagger UI 5.34.1 from the swagger-ui-dist npm package. It is vendored under httpbin/static/swagger-ui with its licence and notice, and checked against the registry's integrity hash.
  • flasgger's static route serves that copy, so its old bundled files are no longer reachable.
  • The page no longer loads jQuery (it was used only in a commented-out line), and it sets queryConfigEnabled: false explicitly.

Why
flasgger's latest release (0.9.7.1) still bundles Swagger UI 3.28.0 with DOMPurify 2.0.7, plus jQuery 2.2.4. Those versions carry 29 known advisories: 2 Swagger UI (including CVE-2018-25031), 23 DOMPurify (1 critical, 3 high) and 4 jQuery XSS. The new copy has none (DOMPurify 3.4.17).

Impact for self-hosters
The API page looks and works as before; it was checked in a headless browser. ?url= and ?configUrl= in the page address can no longer swap in another spec.

Generated with Claude Code

flasgger 0.9.7.1 is its latest release. It still bundles Swagger UI
3.28.0, which embeds DOMPurify 2.0.7, and jQuery 2.2.4. Those carry 2
Swagger UI advisories (including CVE-2018-25031, fixed in 4.1.3), 23
DOMPurify advisories (1 critical, 3 high), and 4 jQuery XSS advisories.
The API page now loads Swagger UI 5.34.1 from the swagger-ui-dist npm
package (DOMPurify 3.4.17, no known advisories), vendored under
httpbin/static/swagger-ui with its licence. flasgger's static route
serves that directory, so its old files are no longer reachable.

The page used jQuery only in a commented-out line, so it no longer
loads jQuery. queryConfigEnabled is set to false explicitly, so ?url=
and ?configUrl= in the page address cannot swap the spec.

Co-Authored-By: Claude <noreply@anthropic.com>
Base automatically changed from build/docker-python-3.15 to master November 6, 2026 22:53
@harryjackson
harryjackson merged commit 5f515d9 into master Nov 6, 2026
12 checks passed
@harryjackson
harryjackson deleted the fix/vendor-swagger-ui-5 branch November 6, 2026 22:53
opensource-fork-sync Bot pushed a commit to cla7aye15I4nd/opensource-postmanlabs__httpbin that referenced this pull request Nov 12, 2026
The vendored bundles begin "For license information please see
swagger-ui-bundle.js.LICENSE.txt", but postmanlabs#751 did not vendor those files.
They carry the notices for the third-party code inside the bundles
(React and many other MIT packages, ieee754 under BSD-3-Clause,
DOMPurify under Apache-2.0 OR MPL-2.0), and MIT and BSD require the
notice to travel with every copy. Both files are now vendored, unchanged
from swagger-ui-dist 5.34.1, beside a README that records the tarball,
its integrity hash and how to update it.

The metadata said MIT, but LICENSE is Kenneth Reitz's ISC licence, and
it left out the bundled code. It now declares "ISC AND Apache-2.0 AND
MIT AND BSD-3-Clause AND (Apache-2.0 OR MPL-2.0)" and lists Swagger UI's
LICENSE, NOTICE and both notice files in license-files.

Co-Authored-By: Claude <noreply@anthropic.com>
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