Skip to content
This repository was archived by the owner on Oct 15, 2026. It is now read-only.

fix: validate socket session id - #3075

Open
qvalentin wants to merge 1 commit into
Chainlit:mainfrom
qvalentin:fix/validate-socket-session-id
Open

qvalentin wants to merge 1 commit into
Chainlit:mainfrom
qvalentin:fix/validate-socket-session-id

Conversation

@qvalentin

@qvalentin qvalentin commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

fixes the following security report: https://security.snyk.io/vuln/SNYK-PYTHON-CHAINLIT-19659988


Summary by cubic

Fixes a path traversal vulnerability (SNYK-PYTHON-CHAINLIT-19659988) where a client-supplied session ID could escape the session files directory and delete arbitrary paths.

  • Session IDs are now validated against a strict pattern ([A-Za-z0-9_-]{1,128}) before use.
  • Websocket connections with invalid or missing session IDs are refused at connect time, and accessing files_dir with an invalid ID raises a ValueError.

Written for commit f41969d. Summary will update on new commits.

View guided diff

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

View guided diff | Re-trigger cubic

This branch has not been deployed

No deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant