CVE-2026-108258: Shiny Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-47c3-hpmg-7j6p
CWE-22
Published
Advisory Summary

CVE-2026-108258 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Shiny libraries in the PyPI ecosystem. The issue involves shiny for python has path traversal in bookmark restore. Remediation is available by upgrading affected packages to version 1.6.4.

CVE-2026-108258 at a Glance

CVE Identifier CVE-2026-108258
GHSA Identifier GHSA-47c3-hpmg-7j6p
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Shiny
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-108258

To remediate this vulnerability, upgrade all affected Shiny dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

shiny fixed: 1.6.4
pip install shiny>=1.6.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show shiny

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-108258, inspect your installed packages using pip:

pip show shiny

Analyze the terminal output to locate any version of Shiny in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.4), your application is affected.

Note: The pip show shiny command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Shiny, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Shiny for Python's bookmark-restore path accepted a client-supplied `_state_id_` query-string value and joined it into the server-side bookmark directory (`<cwd>/shiny_bookmarks/<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 (`bookmark_store="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 `bookmark_store="server"` **and** using `ui.input_file()` 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 `bookmark_store` setting at a single point, so it no longer runs when bookmarking is disabled, and the on-disk restore path is honored only under `bookmark_store="server"`. ### Workarounds There is no configuration change that mitigates this on an affected version: the restore path ran even with `bookmark_store="disable"`. Deployments that cannot upgrade immediately can strip the `_state_id_` 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](https://github.com/0xRenSec).

CVE-2026-108258 Affected Shiny Versions

1 component(s)
Fixed Versions:
1.6.4
Product / Package Ecosystem Affected Versions Fixed Version
shiny
PyPI
≥ 1.4.0
< 1.6.4
1.6.4

References

Frequently Asked Questions

What is CVE-2026-108258?
CVE-2026-108258 is a security vulnerability in Shiny involving Shiny for Python has path traversal in bookmark restore under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Shiny versions are affected?
Affected versions include releases prior to 1.6.4 across affected packages: shiny.
What version fixes CVE-2026-108258?
Upgrading to 1.6.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is shiny affected?
Yes, shiny is affected in releases prior to 1.6.4. Upgrade your dependency to 1.6.4 or later.
What CWE is associated with CVE-2026-108258?
CVE-2026-108258 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2026-108258?
Run the dependency tree command: 'pip show shiny'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-47c3-hpmg-7j6p",
  "modified" : "2026-10-09T20:56:37Z",
  "published" : "2026-10-09T20:56:37Z",
  "aliases" : [ "CVE-2026-108258" ],
  "summary" : "Shiny for Python has path traversal in bookmark restore",
  "details" : "### Impact\n\nShiny for Python's bookmark-restore path accepted a client-supplied `_state_id_`\nquery-string value and joined it into the server-side bookmark directory\n(`<cwd>/shiny_bookmarks/<id>`) without validating it. A value containing `..`\npath segments, or an absolute path, could therefore cause the server to open and\nparse `input.json` and `values.json` from a directory outside the bookmark store.\n\nOn a default application the restore was attempted whenever the client supplied a\nURL query string — including when bookmarking was disabled\n(`bookmark_store=\"disable\"`) — so no opt-in configuration was required. For such\napplications the impact is an unauthenticated, server-side probe for the\nexistence and JSON-validity of attacker-chosen paths, constrained to those two\nfile names.\n\nApplications configured with `bookmark_store=\"server\"` **and** using\n`ui.input_file()` are affected more seriously. The file-input restore handler\ncopies files out of the restore directory, so the contents of an\nattacker-selected file name within an attacker-selected directory could be read\ninto the application.\n\n### Affected versions\n\n1.4.0 through 1.6.3. Bookmarking was introduced in 1.4.0; earlier releases do\nnot contain the affected code path and are not affected.\n\n### Patches\n\nFixed in **1.6.4**. Upgrade with:\n\n```\npip install --upgrade shiny\n```\n\nThe fix validates bookmark IDs against an allowlist — a single path segment\nmatching `[A-Za-z0-9_-]+`, which cannot express a path separator, a `..` parent\nreference, or an absolute path — before the ID is used to build a filesystem\npath. Bookmark IDs generated by Shiny are unaffected by this restriction.\nRestore is additionally gated on the application's `bookmark_store` setting at a\nsingle point, so it no longer runs when bookmarking is disabled, and the on-disk\nrestore path is honored only under `bookmark_store=\"server\"`.\n\n### Workarounds\n\nThere is no configuration change that mitigates this on an affected version:\nthe restore path ran even with `bookmark_store=\"disable\"`. Deployments that\ncannot upgrade immediately can strip the `_state_id_` parameter from incoming\nquery strings at a reverse proxy or load balancer, which prevents the affected\ncode path from being reached.\n\n### Credits\n\nReported by [@0xRenSec](https://github.com/0xRenSec).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "shiny"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0"
      }, {
        "fixed" : "1.6.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.6.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/posit-dev/py-shiny/security/advisories/GHSA-47c3-hpmg-7j6p"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/posit-dev/py-shiny/commit/1d8ecb46cbc9621b7dc8812111d26692e086b376"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/posit-dev/py-shiny"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/posit-dev/py-shiny/releases/tag/v1.6.4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-09T20:56:37Z",
    "nvd_published_at" : null
  }
}