Dalfox Server Mode Vulnerable to Unauthenticated Remote Code Execution via found-action
# GHSA: Unauthenticated Remote Code Execution via found-action in Dalfox Server Mode
When dalfox is started in REST API server mode (dalfox server), the server binds to 0.0.0.0:6664 by default and requires no API key unless the operator explicitly passes --api-key. Because model.Options — including FoundAction and FoundActionShell — is deserialized directly from attacker-supplied JSON in POST /scan, and because dalfox.Initialize explicitly propagates those two fields into the final scan options without stripping them, any unauthenticated caller who can reach the server port can supply an arbitrary shell command that the dalfox process will execute on the host whenever a scan finding is triggered.
Critical (CVSS 3.1: 10.0)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
0.0.0.0 by default; reachable by any network peer.cmd/server.go — init() (line 51): --api-key defaults to ""pkg/server/server.go — setupEchoServer() (line 68): auth middleware only registered when APIKey != ""pkg/server/server.go — postScanHandler() (lines 173–191): rq.Options passed to ScanFromAPI without sanitizationlib/func.go — Initialize() (lines 118–119): FoundAction / FoundActionShell explicitly propagated from caller optionspkg/scanning/foundaction.go — foundAction() (lines 17–18): exec.Command(options.FoundActionShell, "-c", afterCmd) executed unconditionallycmd/server.go registers the --api-key flag with an empty string default:
```go
// cmd/server.go:51
serverCmd.Flags().StringVar(&apiKey, "api-key", "", "Specify the API key for server authentication...")
```
setupEchoServer only installs the apiKeyAuth middleware when that value is non-empty:
```go
// pkg/server/server.go:68-70
if options.ServerType == "rest" && options.APIKey != "" {
e.Use(apiKeyAuth(options.APIKey, options))
}
```
A server started without --api-key accepts every request on every route with no challenge. The apiKeyAuth implementation itself is correct — the flaw is purely in the opt-in condition that makes authentication off by default.
Options Reaches Shell Execution Without StrippingPOST /scan deserializes the full model.Options struct from the JSON body:
```go
// pkg/server/model.go:6-8
type Req struct {
URL string json:"url"
Options model.Options json:"options"
}
// pkg/server/server.go:173-191
rq := new(Req)
if err := c.Bind(rq); err != nil { ... }
go ScanFromAPI(rq.URL, rq.Options, *options, sid)
```
model.Options exposes both execution-control fields as JSON-tagged properties:
```go
// pkg/model/options.go:83-84
FoundAction string json:"found-action,omitempty"
FoundActionShell string json:"found-action-shell,omitempty"
```
ScanFromAPI builds the scan target directly from rqOptions and passes it to dalfox.Initialize:
```go
// pkg/server/scan.go:22-27
target := dalfox.Target{
URL: url,
Method: rqOptions.Method,
Options: rqOptions,
}
newOptions := dalfox.Initialize(target, target.Options)
```
Initialize explicitly copies both fields into newOptions — there is no stripping path:
```go
// lib/func.go:118-119
"FoundAction": {&newOptions.FoundAction, options.FoundAction},
"FoundActionShell": {&newOptions.FoundActionShell, options.FoundActionShell},
```
foundAction is called from seven locations across pkg/scanning/scanning.go and pkg/scanning/sendReq.go whenever options.FoundAction != "" and any vulnerability is detected. None of these call sites check options.IsAPI:
```go
// pkg/scanning/foundaction.go:12-18
func foundAction(options model.Options, target, query, ptype string) {
afterCmd := options.FoundAction
afterCmd = string
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity high, availability high.
The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVE-2026-45087 is recorded against 3 packages.
Published on 25 June 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.
github.com (Advisory)
nvd.nist.gov (Advisory)
github.com (Web)
github.com/hahwul/dalfox has other advisories on record. If you are patching this one, these are worth checking on the same host:
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| github.com/hahwul/dalfox | — | — |
| github.com/hahwul/dalfox/v2 | — | — |
| unknown | — | — |
References
Similar Threats
Exploit Protection
CVE-2026-45087 carries CVSS 10.0 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2026-45087 →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.