Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-45088 — dalfox

🟠 CVSS 8.0 — High ✅ No Known Exploit NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Dalfox Server Mode has an Unauthenticated Arbitrary File Read with Out-of-Band Exfiltration via custom-payload-file

Summary

When dalfox is run in REST API server mode, the custom-payload-file field in model.Options is JSON-tagged and deserialized directly from the attacker's request body, then propagated unchanged through dalfox.Initialize into the scan engine. The engine passes the value to voltFile.ReadLinesOrLiteral, which reads lines from any file path accessible to the dalfox process and embeds each line as an XSS payload in outbound HTTP requests directed at the attacker-controlled target URL. Because the server has no API key by default, an unauthenticated network attacker can exfiltrate the contents of arbitrary files on the dalfox host by reading them line-by-line through scan traffic.

Severity

High (CVSS 3.1: 7.5)

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

  • Attack Vector: Network — server binds to 0.0.0.0:6664 by default; reachable by any network peer.
  • Attack Complexity: Low — no preconditions beyond network access; skip-discovery and param are both attacker-supplied, so the code path is fully under attacker control.
  • Privileges Required: None — --api-key defaults to "", so the auth middleware is not registered.
  • User Interaction: None.
  • Scope: Unchanged — the file read and the outbound HTTP exfiltration request both originate from the same dalfox process authority.
  • Confidentiality Impact: High — the attacker can read any file the dalfox process can open: private keys, configuration files containing database credentials, environment files, /etc/passwd, etc.
  • Integrity Impact: None — this path is read-only.
  • Availability Impact: None.

Affected Component

  • cmd/server.goinit() (line 51): --api-key defaults to "" — no auth by default
  • pkg/server/server.gosetupEchoServer() (line 68): auth middleware only registered when APIKey != ""
  • pkg/server/server.gopostScanHandler() (lines 173–191): rq.Options (including CustomPayloadFile) passed to ScanFromAPI without sanitization
  • lib/func.goInitialize() (line 117): CustomPayloadFile explicitly propagated from caller options
  • pkg/scanning/scan.go — anonymous block (lines 341–368): voltFile.ReadLinesOrLiteral(options.CustomPayloadFile) reads file; contents injected into outbound requests

CWE

  • CWE-306: Missing Authentication for Critical Function
  • CWE-73: External Control of File Name or Path
  • CWE-552: Files or Directories Accessible to External Parties

Description

custom-payload-file Is Fully Attacker-Controlled

model.Options exposes CustomPayloadFile with a JSON tag:

```go

// pkg/model/options.go:33

CustomPayloadFile string json:"custom-payload-file,omitempty"

```

postScanHandler binds the entire Req.Options from the JSON body and passes it directly to ScanFromAPI:

```go

// pkg/server/server.go:173-191

rq := new(Req)

if err := c.Bind(rq); err != nil { ... }

go ScanFromAPI(rq.URL, rq.Options, *options, sid)

```

ScanFromAPI passes rqOptions as target.Options 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 CustomPayloadFile into newOptions with no filtering:

```go

// lib/func.go:117

"CustomPayloadFile": {&newOptions.CustomPayloadFile, options.CustomPayloadFile},

```

File Read and Exfiltration Path

In pkg/scanning/scan.go, when the scan engine reaches the custom payload phase, it reads the attacker-specified file path:

```go

// pkg/scanning/scan.go:341-366

if (options.SkipDiscovery || utils.IsAllowType(policy["Content-Type"])) && options.CustomPayloadFile != "" {

ff, err := voltFile.ReadLinesOrLiteral(options.CustomPayloadFile)

if err != nil {

printing.DalLog("SYSTEM", "Failed to load custom XSS payload file", options)

} else {

for _, customPayload := range ff {

if customPayload != "" {

for k, v := range params {

if optimization.CheckInspectionParam(options, k) {

...

tq, tm := optimization.MakeRequestQuery(target, k, customPayload, "inHTML"+ptype, "toAppend", encoder, options)

query[tq] = tm

}

}

}

}

}

}

```

Each line of the file becomes a payload value embedded in a query parameter of an HTTP request sent to the attacker-controlled target URL. performScanning then dispatches every entry in the query map via SendReq, delivering the file's contents to the attacker's server as the value of the nominated parameter (e.g., ?q=<file-line>).

Condition Is Trivially Satisfiable

The condition `options.SkipDiscovery || utils.IsAllowType(policy["Content-Type

How this vulnerability can be exploited

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 unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity none, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: None.
  • Availability impact: None.

Affected software

CVE-2026-45088 is recorded against 3 packages.

  • github.com/hahwul/dalfox
  • github.com/hahwul/dalfox/v2
  • unknown

Timeline and source

Published on 25 June 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Advisory)
nvd.nist.gov (Advisory)
github.com (Web)

Other advisories for this package

github.com/hahwul/dalfox has other advisories on record. If you are patching this one, these are worth checking on the same host:

Details

Severity High
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CWE N/A
Public Exploit ✅ No
Source NVD
Published 2026-06-25
Updated 2026-08-20
Modified 2026-06-25
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/hahwul/dalfox
github.com/hahwul/dalfox/v2
unknown

Similar Threats

Site Security Check

Is dalfox part of your stack?

CVE-2026-45088 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

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.

Browse related advisories

All advisoriesCVECVE 2026