Fix critical security vulnerabilities (RCE, Path Traversal, DoS) - #18
Merged
Merged
Conversation
dereuromark
force-pushed
the
security-fixes
branch
3 times, most recently
from
November 20, 2025 21:53
929950e to
1d44ea4
Compare
This commit addresses critical security issues: **CRITICAL:** - Fix unsafe deserialization (RCE vulnerability) in Filesystem store - Use unserialize() with allowed_classes => false to prevent object injection - Maintains backward compatibility with existing array-based serialized files - Fix path traversal vulnerabilities in file operations - Add strict file format validation with regex (alphanumeric session IDs) - Use realpath() to prevent directory traversal attacks - Validate files are within allowed directory - Add screenshot validation to prevent abuse - Validate base64 format with regex for data URIs - Enforce 3MB size limit on encoded data - Allow non-URI values for backwards compatibility All changes maintain backward compatibility while preventing RCE, path traversal, and DoS attacks. All tests pass (21/21), PHPCS and PHPStan checks pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
dereuromark
force-pushed
the
security-fixes
branch
from
November 20, 2025 21:56
1d44ea4 to
4fd03c4
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18 +/- ##
============================================
- Coverage 78.89% 77.67% -1.23%
- Complexity 136 156 +20
============================================
Files 11 11
Lines 398 430 +32
============================================
+ Hits 314 334 +20
- Misses 84 96 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes critical security vulnerabilities that could lead to Remote Code Execution (RCE), path traversal, and Denial of Service (DoS) attacks.
🔴 CRITICAL Security Fixes:
RCE via Unsafe Deserialization (
Filesystem.php)unserialize()without validation on filesystem dataunserialize($content, ['allowed_classes' => false])to prevent object injection attacksPath Traversal Vulnerabilities (
FeedbackController.php,Admin/FeedbackController.php)/^\d+-[a-f0-9]+\.feedback$/realpath()to resolve paths and validate within allowed directory../and other directory traversal attacksScreenshot DoS & Validation (
FeedbackController.php)Test Plan
🤖 Generated with Claude Code