Skip to content

Prevent Host tmpfs Mount Path Traversal via Container Name Validation (Fixed #21)#24

Merged
yulmwu merged 2 commits into
mainfrom
fix/issue-21-container-name-validation
Jun 19, 2026
Merged

Prevent Host tmpfs Mount Path Traversal via Container Name Validation (Fixed #21)#24
yulmwu merged 2 commits into
mainfrom
fix/issue-21-container-name-validation

Conversation

@yulmwu

@yulmwu yulmwu commented Jun 19, 2026

Copy link
Copy Markdown
Member

This change fixes a vulnerability where container names were used directly in host-side tmpfs mount paths without validation, allowing host path traversal through crafted sandbox creation requests.

See the following issue for details:

To address this, validation has been added to enforce the following constraints:

  • Must match ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$
  • Reject /
  • Reject \
  • Reject ..
  • Reject leading and trailing whitespace

These validations are applied in both sbxlet and sbxorch.

For more details, please refer to the changes included in this PR.

Contributors

@yulmwu yulmwu self-assigned this Jun 19, 2026
@yulmwu yulmwu added the fixed label Jun 19, 2026
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@yulmwu yulmwu left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Based on the review, there are no notable issues to point out. 👍

@yulmwu yulmwu merged commit fed24c2 into main Jun 19, 2026
2 checks passed
@yulmwu yulmwu deleted the fix/issue-21-container-name-validation branch June 19, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants