netresearch/assetpicker-bundle
Symfony bundle that adds an asset picker form type and modal UI for selecting images or files from a configured asset source, making it easy to attach assets to entities through standard Symfony forms with a reusable picker widget.
composer require netresearch/assetpicker-bundle:^2.0.README.md and its route definition (often config/routes.yaml or Resources/config/routing.xml). Look for the proxy route that accepts a to query parameter – that is the entry point an attacker exploited in 2.0.0 and earlier.assetpicker.proxy.http_client. In 2.0.1 this is a NoPrivateNetworkHttpClient wrapping your app’s http_client. In Laravel you will need to bind an equivalent client manually (see below).127.0.0.1, 169.254.169.254, and internal hostnames return 403 Forbidden before pointing the front‑end at it.routes/web.php and point it at a controller that replicates the bundle’s proxy logic using Laravel’s HTTP client. Ensure the controller uses a NoPrivateNetworkHttpClient‑equivalent wrapper. Do not forward arbitrary user‑supplied URLs without that wrapper.assetpicker.proxy.http_client (or your own abstraction) that wraps Illuminate\Support\Facades\Http::buildClient() inside Symfony\Component\HttpClient\NoPrivateNetworkHttpClient. Requires symfony/http-client 8.1 or later for the allowList argument.assetpicker.proxy.http_client:
class: Symfony\Component\HttpClient\NoPrivateNetworkHttpClient
arguments:
- '@http_client'
- { allowList: ['10.0.0.0/8', 'internal.example.com'] }
In Laravel: $this->app->singleton('assetpicker.proxy.http_client', fn() => new NoPrivateNetworkHttpClient(Http::buildClient(), ['allowList' => [...]]));throttle middleware to the proxy route to reduce abuse and load.to=http://169.254.169.254/latest/meta-data/ returns 403. Also test a public URL returns the proxied content (mock the HTTP client).localhost or private IPs), your asset picker will now return 403 Forbidden. You must add an allow list as shown above.allowList option is only available in symfony/http-client 8.1+. Check composer show symfony/http-client. Laravel may lock an older version; upgrade if needed or keep the storages public.to parameter and the resolved IP/host to distinguish an SSRF attempt from a legitimate private storage that needs allow‑listing. The application’s own http_client is unaffected – only the proxy client changed.gh attestation verify command. This does not affect runtime, but it is a good reason to pin to 2.0.1 when possible.main – update any CI references or composer documentation links that pointed to master.NoPrivateNetworkHttpClient protection. The bundle exposes the service name assetpicker.proxy.http_client for this purpose.How can I help you explore Laravel packages today?