Repository navigation
fix: serve Swagger UI 5.34.1 instead of flasgger's bundled 3.28 - #751
Merged
Merged
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
/loads Swagger UI 5.34.1 from theswagger-ui-distnpm package. It is vendored underhttpbin/static/swagger-uiwith its licence and notice, and checked against the registry's integrity hash.queryConfigEnabled: falseexplicitly.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