Remote fetch features expand the attack surface

PHP applications can fetch URLs with stream functions, HTTP clients, SOAP integrations or framework libraries. A user-supplied URL may create server-side request risks. A remote response or redirect can also affect resource use and where credentials go.

Recent PHP advisories covered mixed-case HTTPS and FTPS handling, folded HTTP response headers and cross-origin credentials on redirects. Check the exact issue conditions and the runtime branch in use.

Control the destination and response

Allow only required schemes and known destinations. Resolve hostnames and check private or reserved address ranges when user input can influence a destination. Set connection, response and redirect limits. Avoid forwarding authentication headers to another origin.

Do not store passwords or bearer tokens in URLs. Keep request logs from recording sensitive headers or URL user information. Treat redirects as a new destination that needs validation.

Keep the PHP runtime current

Install the PHP release or vendor package containing the relevant fixes. Test integrations with approved endpoints and redirects after updating.

If a business service receives external requests or handles sensitive records, a scoped web application assessment can review URL validation, access rules and data flows.