Severity:

HIGH RISK

(7.3)

SQL Injection in FeMiner WMS Basic Organizational Structure

CVE-2026-3969

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Confidentiality, Integrity, and Availability Compromise via SQL Injection

Severity:

HIGH RISK

(7.3)

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

FeMiner WMS up to version 1.0 contains a SQL injection flaw in the Basic Organizational Structure Module, specifically in depart_add_bg.php, where the Name parameter is used unsafely in database queries.

A remote attacker can manipulate this parameter to inject crafted SQL, potentially accessing, modifying, or deleting backend data.

Affected context

The vulnerability appears in the FeMiner WMS web interface within the Basic Organizational Structure Module, handled by /wms-master/src/basic/depart/depart_add_bg.php.

It affects deployments where user-supplied input in the Name argument is passed to the underlying database layer without robust input handling, parameterization, or output encoding.

The issue is most relevant when the application is exposed over a network and linked to a database account with broad privileges on application data.

Exploit preconditions

  • Attack surface: HTTP endpoint exposed by the FeMiner WMS application, specifically requests that reach depart_add_bg.php.
  • Required access: Ability to send crafted requests to the application (typically unauthenticated or low-privileged web access, depending on how the module is protected).
  • Trigger point: Server-side processing of the Name parameter when constructing SQL statements for department or organizational structure operations.
  • Why exploitation is possible: The value of Name is incorporated into SQL queries without proper parameterization or rigorous sanitization, allowing attacker-controlled SQL fragments to alter the intended query structure.

Why this happens

This issue stems from dynamically constructing SQL statements by concatenating or interpolating the Name parameter directly into query strings.

When user input is treated as part of the query logic rather than as a data parameter, the database engine interprets attacker-controlled content as SQL syntax.

This behavior aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), and is closely related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, because the web layer fails to neutralize special characters before passing data to the database.

The lack of prepared statements, binding, or centralized input validation routines allows the bug pattern to persist across the application's data access paths.

Potential impact

  • Access to sensitive data stored in the WMS database (such as user records, organizational information, or operational data).
  • Modification or deletion of organizational structure records and related business data.
  • Bypassing of application-level authentication or authorization checks by manipulating backend queries.
  • Disruption of application functionality through forced errors or destructive queries, potentially impacting availability.
  • Establishment of a foothold for further attacks, such as extracting configuration data or chaining with other vulnerabilities.

General mitigation guidance

Effective mitigation focuses on eliminating direct string-based query construction and enforcing strong separation between data and SQL logic:

  • Adopt parameterized queries or prepared statements across all data access layers so that user input is always treated as data, not executable SQL.
  • Introduce a centralized input validation layer for fields like Name, constraining allowed characters and length to what is strictly necessary for business use.
  • Apply strict least-privilege principles to database accounts used by the application, granting only required operations on a minimal set of tables.
  • Use a database abstraction or ORM layer configured to default to safe query-building patterns and discourage raw, concatenated SQL.
  • Incorporate contextual output encoding or escaping when data must be embedded into downstream components that interpret structured input (e.g., SQL, XML, JSON).

How teams detect issues like this

Several complementary approaches can help detect this vulnerability class:

  • Static analysis: Configure rules to flag any SQL construction that concatenates user-controlled variables (such as $_GET, $_POST, or request handlers) into query strings, especially in files like depart_add_bg.php.
  • Code review: During manual review, trace the flow of the Name parameter from HTTP handlers to the database layer and look for missing parameter binding, validation, or encoding.
  • Dynamic testing: Use automated or manual testing tools that send injection patterns (e.g., quote characters, boolean conditions, or time-based probes) to the Name parameter and monitor for anomalous responses, errors, or timing differences.
  • Security policy enforcement: Integrate pre-commit or CI checks that disallow raw SQL concatenation in critical modules and require the use of approved database access APIs or query builders.

Sources

SourceLink
github.comgithub.com/yuan384/cve/issues/3
vuldb.comvuldb.com/?ctiid.350404
vuldb.comvuldb.com/?id.350404
vuldb.comvuldb.com/?submit.768977

Frequently asked

questions

The vulnerability is remotely exploitable wherever the affected endpoint is reachable over the network. Any user or client able to send requests to depart_add_bg.php and control the Name parameter may be able to trigger it, subject to any authentication the application requires.

It depends on how the Basic Organizational Structure Module is exposed. If the endpoint is protected behind login, an attacker needs at least low-privileged credentials; if it is publicly accessible or weakly protected, anonymous exploitation is possible.

The most robust fix is to standardize on parameterized queries or prepared statements for all database access and remove any SQL built through string concatenation. At the same time, enforce strict input validation for fields like Name to only allow expected characters and lengths.

Prevention is best achieved by adopting secure coding patterns as defaults: use vetted database abstraction layers that enforce parameterization, define coding standards that prohibit raw concatenated SQL, integrate static analysis in the development pipeline, and perform regular security-focused code reviews and testing around data-access code paths.

Find out what's already
exploitable in your codebase.