Skip to content

Fix issue - #445

Open
zen-triager-bot wants to merge 1 commit into
AikidoSec:mainfrom
zen-triager-bot:zen-triager/aikido-ivlac52v
Open

Fix issue#445
zen-triager-bot wants to merge 1 commit into
AikidoSec:mainfrom
zen-triager-bot:zen-triager/aikido-ivlac52v

Conversation

@zen-triager-bot

Copy link
Copy Markdown

Fix implemented.

This draft was generated after automated triage and requires maintainer review.

@kapyteinaikido
kapyteinaikido marked this pull request as ready for review August 13, 2026 17:18
Comment on lines +12 to 14
size_t pos = filenameStr.find(phpResourceString);
if (pos != std::string::npos) {
return filenameStr.substr(pos + phpResourceString.length());

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.

🟠 High - Nested php://filter wrappers now evade SSRF enforcement

Switching php://filter parsing to a single first-/resource= extraction means payloads such as php://filter/resource=php://filter/resource=http://169.254.169.254/... are now reduced only to the inner wrapper string, not to the final URL PHP will fetch. In helper_handle_pre_file_path_access, that value no longer starts with http:// or https://, so the sink is reclassified as EVENT_PRE_PATH_ACCESSED and no SSRF pre/post handlers run. An attacker who can influence a fopen-style path can therefore wrap an internal URL in a nested filter and bypass the firewall's SSRF protection for that request.

Show fix

Preserve the first-/resource= behavior for each wrapper layer, but keep unwrapping while the extracted resource itself is another php://filter stream. Apply the same recursive normalization in both the PHP extension and the Go helper used by hostname/path checks so nested wrappers resolve to the final target URL before event classification or SSRF matching.

More info - Reply on this comment to give feedback or ignore the issue.

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.

1 participant