# GHSA-CP2Q-FC46-38F5: Extension Workers.SendRequest() runs arbitrary files when its worker is not running

- Database: GitHub
- Severity: CVSS 3.7 (Low)
- Published: 2026-11-05
- Modified: 2026-11-05

## Affected versions

- github.com/dunglas/frankenphp (Go): from 1.10.0, through 1.13.4
- github.com/dunglas/frankenphp/caddy (Go): from 1.10.0, through 1.13.4

## Description

### Impact

Only custom builds that link a Go extension using the experimental extension workers API and forwarding client requests with `Workers.SendRequest()` are affected. Stock binaries and Docker images are not affected.

When the extension's worker was not running, `SendRequest()` did not fail: the request was served as a regular PHP request, with the server's working directory as document root and the request path as script name. A remote client could then run any PHP file below the working directory, including files outside the document root, and read other files there (such as `.env`) verbatim.

With Caddy, this state is reached after the configuration is reloaded twice: `FrankenPHPApp.Stop()` cleared the workers registered with `caddy.RegisterWorkers()`, and since Caddy stops the old app after starting the new one, the workers were missing from the second reload on. It is also reached with the library alone after `Shutdown()` and `Init()` without the extension's option, or when the workers are registered with an empty name. In these states `SendMessage()` blocked until its context ended.

### Patches

Fixed in 1.13.5.

### Workarounds

Restart the server instead of reloading its configuration. Extensions can also refuse to forward requests when `NumThreads()` returns 0, and must register their workers with a non-empty name.

### Details

`SendRequest()` looked up its worker by name with `WithWorkerName()`, which left the worker unset when no worker had that name. The request then fell through to the regular request path.

`WithWorkerName()` now returns an error for an unknown worker name, and `SendRequest()` and `SendMessage()` return an error when the handle's worker was not started by the running instance. A call queued on a worker stopped in the meantime fails too, and the autoscaler no longer starts threads for it. Extension workers can still be missing after a reload until a separate fix lands; calls to them now return an error instead of running a script.

### Proof of concept

An extension registers its workers in `init()` and serves a route with them:

```go
var worker = caddy.RegisterWorkers("reports", "reports-worker.php", 2)

func (h Reports) ServeHTTP(w http.ResponseWriter, r *http.Request, _ caddyhttp.Handler) error {
	return worker.SendRequest(w, r)
}
```

```caddyfile
example.com {
	root public/
	handle_path /reports/* {
		reports
	}
	php_server
}
```

After running `frankenphp reload --force` twice, `GET /reports/bin/maintenance.php` executes `bin/maintenance.php` from the working directory, outside the document root.

### Credits

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-XRD9JA0Y.

## References

- https://github.com/php/frankenphp/security/advisories/GHSA-cp2q-fc46-38f5

Page: https://cve.now/GHSA-CP2Q-FC46-38F5

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
