Dev.to Security 🔐 Cybersecurity 👁 2 📖 2 min read

A forged WhoDB profile flag can make a database server read files from the WhoDB host

A forged WhoDB profile flag can make a database server read files from the WhoDB host WhoDB provides a web interface for connecting to databases. Its connection model includes profile resolution and advanced driver opt

A forged WhoDB profile flag can make a database server read files from the WhoDB host

WhoDB provides a web interface for connecting to databases. Its connection model includes profile resolution and advanced driver options. CVE-2026-142651 shows how a client-controlled trust flag can skip that resolution and turn an ordinary connection attempt into an unauthenticated host file read.

The affected range begins at 0.47.0 and runs through 0.131.0. Version 0.134.0 is fixed. Releases between 0.132.0 and 0.133.x require careful verification against the advisory because the published range uses the last confirmed vulnerable release.

Mechanism

Legacy Bearer and Token cookie credentials were decoded into a Credentials object that included an IsProfile flag. A caller could supply JSON with IsProfile: true and pass arbitrary advanced MySQL options. The shared GORM parser then copied otherwise unknown options into the MySQL data source name.

The attacker uses allowAllFiles=true and controls the MySQL server that WhoDB connects to. That server requests a local file through LOAD DATA LOCAL INFILE. The MySQL driver reads the file on the WhoDB host and sends its contents to the server. The attacker does not need a WhoDB account, an existing session, a CSRF token or user interaction.

The advisory limits the exposure to files readable by the WhoDB process. That still includes configuration, local application data and secrets owned by the service account. The issue bypasses a trust boundary introduced while fixing an earlier WhoDB vulnerability, which makes the regression relevant to teams that had already reviewed the product once.

Why the trust flag matters

Profile resolution normally anchors connection settings to server-side state. Accepting the flag from legacy credentials lets the client claim that state without proving it. The parser then treats the supplied options as trusted connection metadata. This is a design problem at the boundary between authentication, connection parsing and driver behavior. Each component may look correct in isolation while the composed path grants a capability the user never received.

The attack also depends on a reachable MySQL endpoint controlled by the attacker. In an exposed deployment, that requirement can be satisfied by an internet-accessible database service. In a segmented environment it is harder but not impossible, especially when a user can direct outbound connections through an approved path.

Remediation

Upgrade to WhoDB 0.134.0 or later. Restrict WhoDB to trusted management networks, require authentication before profile operations and prevent arbitrary outbound database connections. Run the service with a dedicated low-privilege account and remove unnecessary files from its reachable filesystem.

Review logs for unauthenticated requests carrying legacy Bearer or Token cookie credentials, especially ones that include IsProfile, allowAllFiles or unusual MySQL parameters. Check egress records for connections from WhoDB to unknown MySQL servers. A successful file read may not produce an application error, so network evidence is important.

References

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.