Skip to content

0.21.0: security - Gradio 6.30, dependency floors, launch hardening - #9

Merged
EnragedAntelope merged 1 commit into
mainfrom
security-0.21.0
Oct 26, 2026
Merged

EnragedAntelope merged 1 commit into
mainfrom
security-0.21.0

Conversation

@EnragedAntelope

Copy link
Copy Markdown
Owner

Security release. Existing installs must re-run setup.bat / ./setup.sh to pick up Gradio 6 and the new dependency floors.

Security

  • Gradio 6.30. The <6 cap is removed; the stuck loading overlay that caused it does not occur on 6.30.
  • Dependency floors raised past known CVEs: gradio, starlette, transformers, accelerate, pillow, python-dotenv, pytest. pip-audit -r requirements.txt now reports only Pillow 12.3. Its CVEs are fixed in Pillow 13, which Gradio 6.30 does not allow yet (pillow<13).
  • DNS rebinding. Gradio only checks Origin when the Host is localhost, and allowed_paths covers every drive, so a hostile page could read local files, including .env. A Host allowlist (127.0.0.1, localhost) now rejects other hosts with 400.
  • .env is in blocked_paths. Gradio 6 run history (which stores every input and output) is off.
  • Pillow decodes only PNG/JPEG/WebP/BMP/TIFF. This drops EPS (which runs Ghostscript), JPEG2000 and the other decoders that most of the open Pillow 12 CVEs are in.

Fixes found while testing

  • Quick build Finish and cli build ignored the saved Custom endpoint captioner and failed with "no endpoint URL" (since 0.20.0). cli build now checks the captioner before generating.
  • Under Gradio 6, an empty Textbox reached handlers as None (③ Caption failed on .strip()).
  • Gradio's bundled SemiBold font has only a few glyphs, so "API" drew its "A" in a different font.
  • The test suite overwrote the developer's .cache/user_settings.json.

Testing

  • pytest: 674 passed. ruff check .: clean.
  • New tests: test_launch_security (Host check, .env blocked, bind and share settings), test_pillow_formats, test_gradio6_defaults, and a custom endpoint regression test for build_finish.
  • Full UI test on Gradio 6.30 with no paid API calls:
    • Quick build Local (① preprocess and 24 ComfyUI shots);
    • picker click and shift-click;
    • ③ captioning against a local stub endpoint, and the caption editor;
    • ④ export with zip and the Idiot LoRa Builder hand-off;
    • ⑤ ai-toolkit config;
    • no console errors.

- Gradio 6.30 (the <6 cap is removed); head= and css= are passed at launch()
- Dependency floors raised past known CVEs: gradio, starlette, transformers, accelerate, pillow, python-dotenv, pytest
- All launch() arguments are in app.LAUNCH_KWARGS: a Host check (TrustedHostMiddleware) against DNS rebinding, .env in blocked_paths, run_history off
- Pillow decodes only PNG/JPEG/WebP/BMP/TIFF (drops EPS/Ghostscript, JPEG2000 and other decoders)
- Fix: Gradio's SemiBold font subset drew "A" in a different font
- Fix: Gradio 6 Textbox None default broke handlers (the 3 Caption prefix .strip())
- Fix: Quick build Finish and cli build ignored the saved Custom endpoint captioner
- cli build checks --captioner and the custom endpoint before generating
- Test suite no longer overwrites .cache/user_settings.json
- New tests: test_launch_security, test_pillow_formats, test_gradio6_defaults, custom endpoint in build_finish
- Version 0.21.0; AGENTS.md, ARCHITECTURE updated
@EnragedAntelope
EnragedAntelope merged commit d2541cf into main Oct 26, 2026
3 checks passed
@EnragedAntelope
EnragedAntelope deleted the security-0.21.0 branch October 26, 2026 19:19
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