Skip to content

Security: harden PENS remote transport against SSRF - #8846

Open
krista445 wants to merge 1 commit into
chamilo:masterfrom
krista445:codex/fix-pens-ssrf
Open

Security: harden PENS remote transport against SSRF#8846
krista445 wants to merge 1 commit into
chamilo:masterfrom
krista445:codex/fix-pens-ssrf

Conversation

@krista445

Copy link
Copy Markdown

Summary

  • Route PENS package downloads and HTTP callbacks through SafeHttpClientHelper so private, loopback, reserved, mapped IPv6, compatible IPv6, NAT64, 6to4, and unresolved targets are rejected at connection time.
  • Preserve no-redirect behavior and the 15-second connection limit while retaining the existing 300-second download and 60-second callback totals.
  • Stream downloads without buffering, enforce the 100 MB limit from headers and chunks, detect partial or failed writes, and cancel unused or failed responses.
  • Remove full package URLs from logs and prevent the callback response body from being consumed.

This closes the IPv4-mapped IPv6 follow-up described by GHSA-2xvw-qqjj-q68r without granting a private-network exception to the current Chamilo host.

Validation

  • PHPUnit: 32 tests, 129 assertions
  • ECS: clean
  • Psalm: no errors on changed files
  • PHP syntax checks: clean
  • Symfony container lint: clean
  • git diff --check: clean

Route PENS downloads and callbacks through the private-network-safe HTTP client, preserve redirect and timeout behavior, enforce streaming limits, and cover translated IPv6 and I/O edge cases.
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