/

CVE-2015-20128

Severity:

HIGH RISK

(8.2)

SQL Injection (CWE-89) in FooSun DotNetCMS Web App

CVE-2015-20128

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized database access and information disclosure

Severity:

HIGH RISK

(8.2)

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

FooSun DotNetCMS 1.0 and 2.0 contain a SQL injection flaw in the CityId parameter processed by the City_ajax.aspx endpoint. An unauthenticated attacker may manipulate MSSQL queries to retrieve database information when request input is concatenated into SQL without sufficient validation or parameterization.

FooSun DotNetCMS 1.0 and 2.0 contain a SQL injection flaw in the CityId parameter processed by the City_ajax.aspx endpoint. An unauthenticated attacker may manipulate MSSQL queries to retrieve database information when request input is concatenated into SQL without sufficient validation or parameterization.

Affected context

The vulnerability occurs in the DotNetCMS city lookup functionality exposed through /user/City_ajax.aspx. It becomes risky when the CityId request parameter reaches the MSSQL query without being safely bound or constrained, and when the endpoint is accessible without authentication.

The vulnerability occurs in the DotNetCMS city lookup functionality exposed through /user/City_ajax.aspx. It becomes risky when the CityId request parameter reaches the MSSQL query without being safely bound or constrained, and when the endpoint is accessible without authentication.

Exploit preconditions

  • Attack surface: HTTP GET request to the city lookup endpoint
  • Required access: No authentication may be required if the endpoint is publicly reachable
  • Trigger point: Processing of the CityId parameter
  • Why exploitation is possible: User-controlled input is incorporated into an MSSQL query without reliable parameterization or equivalent query isolation
  • Attack surface: HTTP GET request to the city lookup endpoint
  • Required access: No authentication may be required if the endpoint is publicly reachable
  • Trigger point: Processing of the CityId parameter
  • Why exploitation is possible: User-controlled input is incorporated into an MSSQL query without reliable parameterization or equivalent query isolation

Why this happens

The underlying bug is SQL injection, mapped to CWE-89. The application treats a request parameter as both data and part of a database command by concatenating it into a SQL statement. This breaks the intended separation between query structure and user-provided values, allowing crafted input to alter query behavior.

The underlying bug is SQL injection, mapped to CWE-89. The application treats a request parameter as both data and part of a database command by concatenating it into a SQL statement. This breaks the intended separation between query structure and user-provided values, allowing crafted input to alter query behavior.

Potential impact

  • Unauthorized disclosure of database records or metadata
  • Exposure of sensitive application or user information
  • Circumvention of intended query restrictions
  • Potential modification or deletion of database data if write-capable query paths are reachable
  • Further compromise through exposed credentials or operational information
  • Unauthorized disclosure of database records or metadata
  • Exposure of sensitive application or user information
  • Circumvention of intended query restrictions
  • Potential modification or deletion of database data if write-capable query paths are reachable
  • Further compromise through exposed credentials or operational information

General mitigation guidance

Defensive design typically focuses on preserving a strict boundary between application input and SQL commands.

Common mitigation patterns include:

  • Using parameterized queries or prepared statements for all database access
  • Replacing dynamically concatenated SQL with safe data-access abstractions
  • Applying allowlist validation and appropriate type constraints to identifier parameters
  • Ensuring database accounts have only the permissions required by the endpoint
  • Limiting unauthenticated access to data-returning endpoints where business requirements permit
  • Avoiding detailed database errors in client-facing responses
  • Treating all request parameters as untrusted, including values that appear numeric

Defensive design typically focuses on preserving a strict boundary between application input and SQL commands.

Common mitigation patterns include:

  • Using parameterized queries or prepared statements for all database access
  • Replacing dynamically concatenated SQL with safe data-access abstractions
  • Applying allowlist validation and appropriate type constraints to identifier parameters
  • Ensuring database accounts have only the permissions required by the endpoint
  • Limiting unauthenticated access to data-returning endpoints where business requirements permit
  • Avoiding detailed database errors in client-facing responses
  • Treating all request parameters as untrusted, including values that appear numeric

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules identifying string concatenation or interpolation in SQL construction
  • Code review checks for request parameters passed directly to database APIs
  • Dynamic testing with controlled metacharacter and query-manipulation probes in non-production environments
  • Web application firewall or gateway policies that flag anomalous database-oriented request patterns
  • Database monitoring for unexpected query structures, enumeration behavior, or excessive metadata access
  • Automated security review tools that identify missing parameter binding and weak input validation

Detection approaches may include:

  • Static analysis rules identifying string concatenation or interpolation in SQL construction
  • Code review checks for request parameters passed directly to database APIs
  • Dynamic testing with controlled metacharacter and query-manipulation probes in non-production environments
  • Web application firewall or gateway policies that flag anomalous database-oriented request patterns
  • Database monitoring for unexpected query structures, enumeration behavior, or excessive metadata access
  • Automated security review tools that identify missing parameter binding and weak input validation

Sources

SourceLink
github.comgithub.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/other/dotnetcms-sqli.yaml
web.archive.orgweb.archive.org/web/20150203014116/http://www.foosun.net/
cnblogs.comcnblogs.com/rebeyond/p/4951418.html
vulncheck.comvulncheck.com/advisories/foosun-dotnetcms-1.0-2.0-sql-injection-via-city-ajax-aspx

Frequently asked

questions

Yes, it may be remotely exploitable when the affected endpoint is reachable over HTTP and accepts unauthenticated requests.

The described attack does not require an authenticated account, but network access to the endpoint and a deployment that exposes the vulnerable functionality are still necessary.

Use parameterized database queries or prepared statements, combined with strict validation appropriate to the expected CityId data type.

Treat all request input as untrusted, enforce secure data-access patterns through code review and automated analysis, minimize database privileges, and monitor for abnormal query activity.

Yes, it may be remotely exploitable when the affected endpoint is reachable over HTTP and accepts unauthenticated requests.

The described attack does not require an authenticated account, but network access to the endpoint and a deployment that exposes the vulnerable functionality are still necessary.

Use parameterized database queries or prepared statements, combined with strict validation appropriate to the expected CityId data type.

Treat all request input as untrusted, enforce secure data-access patterns through code review and automated analysis, minimize database privileges, and monitor for abnormal query activity.

Find out what's already
exploitable in your codebase.