Skip to content

Path traversal vulnerability in static file serving #116

Closed

Description

@coderabbitai

Issue Description

A potential path traversal vulnerability has been identified in the static file serving functionality that was moved from Serverpod to Relic. The current path calculation does not verify that the final filePath is within the expected directory, which could allow malicious clients to retrieve files above the intended web folder.

Security Concern

The path calculation logic constructs file paths without proper validation to ensure they remain within the designated serving directory. This could potentially allow directory traversal attacks using patterns like ../ to access files outside the intended scope.

Context

This issue was identified during code review of Serverpod PR #3625 where static file serving functionality was being refactored. The concern was raised by @tp and acknowledged by @nielsenko.

References

Expected Outcome

The path calculation should include proper validation to ensure that the resolved file path remains within the expected serving directory and cannot be used to access files outside the intended scope.

Reported by: @nielsenko

Activity

  1. moved this from Backlog to Later 🥳 in Relic Roadmapon Aug 5, 2025
  2. moved this from Later 🥳 to Next 🌟 in Relic Roadmapon Aug 6, 2025
  3. self-assigned this
    on Aug 6, 2025
  4. moved this from Next 🌟 to Now 🔥 in Relic Roadmapon Aug 11, 2025
  5. moved this from Inbox 📫 to In Progress 🔥 in Serverpod Frameworkson Aug 14, 2025
  6. moved this from In Progress 🔥 to Done 🚀 in Serverpod Frameworkson Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions