/

CVE-2026-119656

Severity:

HIGH RISK

(7.5)

SQL Injection (CWE-89) in CoreShop Agent API Endpoint

CVE-2026-119656

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized Data Access

Severity:

HIGH RISK

(7.5)

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

CoreShop through version 1.5.5 contains a high-severity SQL injection vulnerability in the unauthenticated api/Agent/GetGoodsPageList endpoint. An attacker may manipulate the order parameter to influence an ORDER BY clause and extract member or order data through boolean-based or time-based blind techniques when the endpoint is publicly reachable.

CoreShop through version 1.5.5 contains a high-severity SQL injection vulnerability in the unauthenticated api/Agent/GetGoodsPageList endpoint. An attacker may manipulate the order parameter to influence an ORDER BY clause and extract member or order data through boolean-based or time-based blind techniques when the endpoint is publicly reachable.

Affected context

The vulnerability occurs in CoreShop deployments where the Agent goods-list API is exposed without authentication and the order parameter is incorporated into database sorting logic. Risk is higher when application-level field checks do not constrain the resulting SQL expression and the database account can read sensitive member or order records.

The vulnerability occurs in CoreShop deployments where the Agent goods-list API is exposed without authentication and the order parameter is incorporated into database sorting logic. Risk is higher when application-level field checks do not constrain the resulting SQL expression and the database account can read sensitive member or order records.

Exploit preconditions

  • Attack surface: The api/Agent/GetGoodsPageList HTTP endpoint
  • Required access: No authentication may be required when the endpoint is publicly accessible
  • Trigger point: Processing of the user-controlled order parameter during query construction
  • Why exploitation is possible: Input is appended to an ORDER BY clause, while validation can be bypassed, allowing database expressions to influence observable query behavior
  • Attack surface: The api/Agent/GetGoodsPageList HTTP endpoint
  • Required access: No authentication may be required when the endpoint is publicly accessible
  • Trigger point: Processing of the user-controlled order parameter during query construction
  • Why exploitation is possible: Input is appended to an ORDER BY clause, while validation can be bypassed, allowing database expressions to influence observable query behavior

Why this happens

The underlying bug is the unsafe incorporation of client-controlled sorting input into SQL query construction. Rather than restricting the value to a server-defined set of column names and directions, the application permits input to affect an ORDER BY expression in a way that can be interpreted by the database. This maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection.

The underlying bug is the unsafe incorporation of client-controlled sorting input into SQL query construction. Rather than restricting the value to a server-defined set of column names and directions, the application permits input to affect an ORDER BY expression in a way that can be interpreted by the database. This maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection.

Potential impact

  • An attacker may infer sensitive database values through blind query behavior
  • Member accounts and order information could be exposed
  • Database confidentiality and privacy may be compromised
  • Excessive query execution could affect application availability
  • Retrieved information could support account abuse or further attacks
  • An attacker may infer sensitive database values through blind query behavior
  • Member accounts and order information could be exposed
  • Database confidentiality and privacy may be compromised
  • Excessive query execution could affect application availability
  • Retrieved information could support account abuse or further attacks

General mitigation guidance

Mitigation generally focuses on reducing trust in client-controlled sorting input and separating query structure from request data.

Common defensive patterns include:

  • Map accepted sort fields and directions to a fixed server-side allowlist
  • Reject unknown, ambiguous, or structurally complex ordering values
  • Use parameterized query mechanisms where supported, while recognizing that identifiers may require explicit allowlisting
  • Apply strict input validation before query construction
  • Run the application with a database identity limited to the data and operations it requires
  • Require authentication and authorization for endpoints that expose sensitive records
  • Avoid returning detailed database errors or timing signals to clients

Mitigation generally focuses on reducing trust in client-controlled sorting input and separating query structure from request data.

Common defensive patterns include:

  • Map accepted sort fields and directions to a fixed server-side allowlist
  • Reject unknown, ambiguous, or structurally complex ordering values
  • Use parameterized query mechanisms where supported, while recognizing that identifiers may require explicit allowlisting
  • Apply strict input validation before query construction
  • Run the application with a database identity limited to the data and operations it requires
  • Require authentication and authorization for endpoints that expose sensitive records
  • Avoid returning detailed database errors or timing signals to clients

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying request parameters concatenated into SQL fragments or ORM ordering expressions
  • Code review checks for dynamic ORDER BY construction and incomplete field allowlists
  • Automated API testing that supplies unexpected sorting values and compares response timing, status, and content behavior
  • Database and web logs showing repeated anomalous requests to the goods-list endpoint or unusual query latency
  • Policy enforcement requiring parameterized queries and server-side mappings for dynamic identifiers

Automated security review tools may help identify unsafe query construction, but findings should be validated against the application's actual database behavior.

Organizations can look for this weakness through:

  • Static analysis rules identifying request parameters concatenated into SQL fragments or ORM ordering expressions
  • Code review checks for dynamic ORDER BY construction and incomplete field allowlists
  • Automated API testing that supplies unexpected sorting values and compares response timing, status, and content behavior
  • Database and web logs showing repeated anomalous requests to the goods-list endpoint or unusual query latency
  • Policy enforcement requiring parameterized queries and server-side mappings for dynamic identifiers

Automated security review tools may help identify unsafe query construction, but findings should be validated against the application's actual database behavior.

Sources

SourceLink
github.comgithub.com/CoreUnion/CoreShop
github.comgithub.com/CoreUnion/CoreShop/blob/v1.5.5/CoreCms.Net.Repository/Good/CoreCmsGoodsRepository.cs#L1622-L1730
github.comgithub.com/CoreUnion/CoreShop/blob/v1.5.5/CoreCms.Net.Web.WebApi/Controllers/AgentController.cs#L164-L170
github.comgithub.com/CoreUnion/CoreShop/commit/e40085b81d78ea55790305bc4a1592309b294048
github.comgithub.com/CoreUnion/CoreShop/issues/20
hackmd.iohackmd.io/@hieuPenguinnn/coreshop-goods-orderby-sql-injection
vulncheck.comvulncheck.com/advisories/coreshop-through-1.5.5-sql-injection-via-order-parameter-in-agent-getgoodspagelist

Frequently asked

questions

It may be remotely exploitable when the affected API endpoint is accessible over the network without authentication and accepts attacker-controlled ordering input.

Not necessarily. The described issue is unauthenticated, so the key condition is access to the endpoint rather than possession of application credentials.

Restrict sorting to a server-side allowlist of known fields and directions, and ensure user input cannot become arbitrary SQL syntax or expressions.

Use parameterized database interfaces where applicable, validate dynamic query components explicitly, limit database privileges, protect sensitive endpoints with authorization, and include SQL injection checks in code review and automated testing.

It may be remotely exploitable when the affected API endpoint is accessible over the network without authentication and accepts attacker-controlled ordering input.

Not necessarily. The described issue is unauthenticated, so the key condition is access to the endpoint rather than possession of application credentials.

Restrict sorting to a server-side allowlist of known fields and directions, and ensure user input cannot become arbitrary SQL syntax or expressions.

Use parameterized database interfaces where applicable, validate dynamic query components explicitly, limit database privileges, protect sensitive endpoints with authorization, and include SQL injection checks in code review and automated testing.

Find out what's already
exploitable in your codebase.