Skip to content

Conversation

HackedRico
Copy link
Contributor

@HackedRico HackedRico commented Jul 9, 2025

Description

Additional checks to ensure proper sanitization of filenames and paths for DELETE request.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tested different curl requests against CALDERA payload handler to ensure proper sanitization of filenames and DELETE functionality. In this testing, CALDERA v5.3.0 was used.

Examples:
(would require getting API session Cookie for test cases)

Should Work

curl -k -X DELETE \
    -H "Cookie: API_SESSION=$COOKIE" \
    'http://127.0.0.1:8888/api/v2/payloads/something.txt'

Expected Failure

curl -k -X DELETE \
    -H "Cookie: API_SESSION=$COOKIE" \
    'http://127.0.0.1:8888/api/v2/payloads/../../LICENSE'

This request escapes out of data/payloads directory which is a prohibited path traversal.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code

uruwhy
uruwhy previously approved these changes Aug 19, 2025
uruwhy
uruwhy previously approved these changes Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants