Severity:

HIGH RISK

(7.3)

SQL Injection in Accounting System /view_work.php

CVE-2026-5035

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database Compromise and Data Integrity Loss

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

Accounting System 1.0 contains a SQL injection vulnerability in the Parameter Handler of /view_work.php, where the en_id parameter is used in database queries without proper sanitization.

A remote attacker can manipulate this parameter to inject arbitrary SQL, potentially accessing, modifying, or deleting data in the application's database when crafted input is processed.

Affected context

The vulnerability appears in the web-facing portion of the Accounting System 1.0 application, specifically in /view_work.php when handling the en_id request parameter.

It manifests when user-controlled input is incorporated into SQL statements without sufficient neutralization or parameterization.

Any deployment that exposes this endpoint over a network and relies on a relational database backend may be affected, especially when default configurations and common privilege assignments are in place.

Exploit preconditions

  • Attack surface: HTTP(S) endpoint /view_work.php in Accounting System 1.0
  • Required access: Remote network access to the web application; no special privileges are necessarily required if the vulnerable parameter is publicly reachable
  • Trigger point: Submission of crafted en_id values via query string or POST data that are processed by the Parameter Handler to build SQL queries
  • Why exploitation is possible: The application appears to concatenate or interpolate the en_id parameter directly into SQL statements without using prepared statements or robust input neutralization, allowing attacker-controlled fragments to alter the query structure

Why this happens

The issue stems from treating user-controlled input as trusted when constructing SQL queries.

Instead of using parameterized queries or safe query-building abstractions, the application likely concatenates the en_id parameter into SQL strings, enabling an attacker to inject additional clauses or statements.

This maps to 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, since the unsanitized input is propagated into the database layer.

Abstractly, the insecure pattern is: sql = "SELECT ... WHERE id = " + user_supplied_en_id, or an equivalent direct inclusion of untrusted data into SQL syntax.

Potential impact

  • May allow retrieval of sensitive accounting or user data from the database
  • Could enable modification or deletion of financial records, transactions, or configuration data
  • Can facilitate creation of new accounts or escalation of privileges within the application's data model
  • May allow enumeration of the database schema and extraction of authentication-related information (e.g., hashed passwords) depending on table design
  • Could be combined with other weaknesses to achieve broader system compromise

General mitigation guidance

Mitigation should focus on eliminating direct concatenation of user input into SQL and tightening trust boundaries around parameters flowing into the database.

Recommended defensive patterns include:

  • Adopting parameterized queries or prepared statements for all database access paths, ensuring that values like en_id are bound as parameters rather than embedded in SQL strings
  • Using higher-level ORM or query builder abstractions that separate query structure from data and default to safe parameter handling
  • Implementing strict server-side validation and normalization on identifier parameters (e.g., enforcing numeric or UUID formats and rejecting unexpected characters)
  • Applying least-privilege principles to the database account used by the application so that, even if a query is abused, it cannot perform high-impact operations like schema changes
  • Centralizing input handling and encoding rules so that security controls are consistently applied across all parameters and endpoints

How teams detect issues like this

High-level detection approaches can combine code-centric and behavior-centric methods:

  • Static analysis: Configure rules to flag dynamic SQL construction where variables derived from HTTP parameters (e.g., en_id) are concatenated into query strings; detect use of low-level APIs that accept raw SQL with interpolated user data
  • Code review: Look for patterns such as string concatenation or formatting operations used to build SQL; verify that all database calls use parameter binding; pay special attention to legacy or "utility" scripts like /view_work.php
  • Runtime monitoring: Use database activity monitoring or web application firewalls to identify anomalous queries containing typical injection patterns (e.g., tautologies, UNION SELECT, stacked statements where supported)
  • Security testing: Incorporate automated and manual SQL injection testing into regular assessment pipelines, focusing on endpoints that accept IDs or filters and pass them directly to the database

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/Xu-Zhihan/CVE/issues/8
vuldb.comvuldb.com/submit/778603
vuldb.comvuldb.com/vuln/353961
vuldb.comvuldb.com/vuln/353961/cti

Frequently asked

questions

Yes. As long as /view_work.php is accessible over the network, a remote attacker can send crafted requests manipulating the en_id parameter to attempt SQL injection.

Typically only basic access to the web endpoint is required. If the vulnerable parameter is not behind authentication, anonymous users may be able to exploit it; if it is authenticated, any user who can reach the functionality could be a potential attacker.

The most robust fix is to refactor all affected queries to use prepared statements or ORM parameter binding, ensuring en_id and similar parameters are always treated as data, never as query syntax. Complement this with strict input validation on all identifiers.

Establish development standards that prohibit dynamic SQL string concatenation with user input, enforce these rules through code review and static analysis, and favor secure-by-default database access layers. Regular security testing and training developers on injection risks further reduces the likelihood of reintroduction.

Find out what's already
exploitable in your codebase.