/

CVE-2026-134034

Severity:

HIGH RISK

(8.1)

SQL Injection (CWE-89) in HortusFox Admin Toggle Route

CVE-2026-134034

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89, CWE-352

Impact:

Database disclosure and modification, with potential changes to administrator access settings

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

HortusFox's administrator environment toggle can pass an unvalidated parameter into an SQL identifier, creating a SQL injection risk. An unauthenticated attacker may exploit this by inducing a signed-in administrator to visit a crafted link, potentially exposing database contents or changing settings.

Affected context

The issue occurs in the administrator boolean-toggle route, where the name parameter is passed to AppModel::updateSingle() and incorporated into an SQL UPDATE statement. Risk arises when a request can be triggered in an administrator's authenticated browser session and the parameter is not restricted to approved identifiers. The described impact includes database reads and setting changes; exposure of a password hash does not by itself enable direct login.

Exploit preconditions

  • Attack surface: The HortusFox administrator environment boolean-toggle route.
  • Required access: The attacker need not be authenticated, but must be able to induce a signed-in administrator to visit a crafted link.
  • Trigger point: Processing of the route's name parameter by the toggle handler.
  • Why exploitation is possible: The parameter is concatenated into the SQL identifier position without validation, allowing crafted input to affect the query. The administrator's browser session can provide the authenticated context for the request.

Why this happens

The handler passes a request-controlled value into an SQL statement's identifier position without constraining it to known column or setting names. This is SQL injection (CWE-89): untrusted input changes the structure or behavior of a database query rather than being treated only as data. Inducing an administrator's browser to make the request also involves cross-site request forgery risk (CWE-352) if the action is not adequately protected against forged requests.

Potential impact

  • Database expressions or subqueries may expose stored information, potentially including an administrator password hash.
  • Database values or application settings may be modified.
  • An attacker could change settings in ways that weaken administrator access controls, potentially enabling passwordless administrator access.
  • A disclosed password hash alone does not provide direct login access.

General mitigation guidance

Defensive patterns include treating request parameters as untrusted and mapping accepted setting names to a fixed allowlist of identifiers. Use parameterized queries for data values, and avoid building SQL identifiers directly from request input; identifiers that cannot be bound as parameters should come only from trusted, constrained mappings.

Protect state-changing actions against cross-site request forgery with appropriate request tokens and browser-side protections, and use authorization checks at the action boundary. Limit database and application privileges so that a compromised request cannot make broader changes than the feature requires.

How teams detect issues like this

Review database calls for request-controlled strings concatenated into SQL, especially in identifier positions such as column names. Check that setting names are constrained by an explicit allowlist and that state-changing administrator routes enforce CSRF protections and authorization.

Static analysis and code-review policies can flag SQL construction from request parameters, unsafe identifier handling, and state-changing routes without CSRF safeguards. Automated security review tools may help identify these patterns.

Sources

SourceLink
github.comgithub.com/danielbrendel/hortusfox-web/commit/71c5c9bdb0485cb453b720f6bb12e1095dd05dd5
github.comgithub.com/danielbrendel/hortusfox-web/releases/tag/v6.2
github.comgithub.com/danielbrendel/hortusfox-web/security/advisories/GHSA-8rwp-2337-54mm

Frequently asked

questions

The described scenario does not require the attacker to sign in, but it does require inducing a signed-in administrator to visit a crafted link so the request is made in that administrator's session.

The attacker does not need the credentials. A victim administrator must be signed in when the action is triggered for the described browser-session scenario.

Do not use request input to construct SQL identifiers. Map accepted names to trusted identifiers, bind data values with parameterized queries, and protect state-changing actions against forged requests.

Apply strict allowlists at input boundaries, review SQL construction and CSRF protections in code review, and limit the privileges available to application database accounts.

Find out what's already
exploitable in your codebase.