GHSA-47c3-hpmg-7j6p: Path Traversal

Published Oct 9, 2026
·
Updated

Impact

Shiny for Python's bookmark-restore path accepted a client-supplied stateid query-string value and joined it into the server-side bookmark directory (<cwd>/shinybookmarks/<id>) without validating it. A value containing .. path segments, or an absolute path, could therefore cause the server to open and parse input.json and values.json from a directory outside the bookmark store.

On a default application the restore was attempted whenever the client supplied a URL query string — including when bookmarking was disabled (bookmarkstore="disable") — so no opt-in configuration was required. For such applications the impact is an unauthenticated, server-side probe for the existence and JSON-validity of attacker-chosen paths, constrained to those two file names.

Applications configured with bookmarkstore="server" and using ui.inputfile() are affected more seriously. The file-input restore handler copies files out of the restore directory, so the contents of an attacker-selected file name within an attacker-selected directory could be read into the application.

Affected versions

1.4.0 through 1.6.3. Bookmarking was introduced in 1.4.0; earlier releases do not contain the affected code path and are not affected.

Patches

Fixed in 1.6.4. Upgrade with:

pip install --upgrade shiny

The fix validates bookmark IDs against an allowlist — a single path segment matching [A-Za-z0-9-]+, which cannot express a path separator, a .. parent reference, or an absolute path — before the ID is used to build a filesystem path. Bookmark IDs generated by Shiny are unaffected by this restriction. Restore is additionally gated on the application's bookmarkstore setting at a single point, so it no longer runs when bookmarking is disabled, and the on-disk restore path is honored only under bookmarkstore="server".

Workarounds

There is no configuration change that mitigates this on an affected version: the restore path ran even with bookmarkstore="disable". Deployments that cannot upgrade immediately can strip the stateid parameter from incoming query strings at a reverse proxy or load balancer, which prevents the affected code path from being reached.

Credits

Reported by @0xRenSec.

Affected Software

1 affected componentFixes available
pip/shiny>=1.4.0<=1.6.3
1.6.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/shiny to a version that resolves this vulnerability.

    Fixed in 1.6.4
  2. Upgrade

    Upgrade shiny to a version that resolves this vulnerability.

    Fixed in 1.6.4
  3. Compensating control

    If upgrading immediately is not possible, strip the `_state_id_` parameter from incoming query strings at a reverse proxy or load balancer to prevent the affected restore code path from being reached.

Event History

Oct 9, 2026
Advisory Published
via GitHub·08:56 PM
Data Sourced
via GitHub·08:56 PM
DescriptionWeaknessAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203