Summary
A SQL injection vulnerability in osCommerce's Account Address List Widget involves the customers_id argument passed to get_address_book_data. If an attacker can supply input that reaches the database query without safe handling, they may be able to alter the query and affect database operations.
Affected context
The issue is reported in the get_address_book_data function in lib/common/helpers/Customer.php, within the Account Address List Widget. It may be exposed when a remotely reachable application path passes attacker-controlled customers_id input to a database query without adequate safeguards. The available description does not specify authentication requirements or the exact query effects.
Exploit preconditions
- Attack surface: A remotely reachable osCommerce path that invokes the account address list function
- Required access: The description does not establish whether authentication is required; an attacker must be able to submit or influence the
customers_idargument - Trigger point: Processing the argument in
get_address_book_data - Why exploitation is possible: The supplied value may affect SQL query structure if it is incorporated without safe parameterization
Why this happens
The reported flaw is SQL injection (CWE-89): attacker-controlled data may be interpreted as part of a SQL statement rather than strictly as a value. This is also related to CWE-74, which covers improper neutralization of special elements in output used by another component. The underlying insecure pattern is constructing or modifying a database query with untrusted input instead of keeping query structure separate from parameter values.
Potential impact
- An attacker could access database records beyond those intended by the application
- An attacker may alter or interfere with database operations, depending on query behavior and database permissions
- The vulnerability could affect the confidentiality or integrity of data available to the application
General mitigation guidance
Mitigations generally focus on separating query logic from untrusted values and reducing the authority of database operations.
- Use parameterized queries or equivalent safe database interfaces by default
- Treat request parameters such as
customers_idas untrusted and validate them against expected types and business rules - Avoid building SQL statements through string concatenation or interpolation
- Apply least-privilege permissions to database accounts and restrict data access to what the feature requires
- Use consistent error handling that does not expose sensitive database details
How teams detect issues like this
- Use static analysis to identify SQL statements built through concatenation or interpolation with request-derived values
- Review database access paths from account-address inputs to query execution, including validation and parameter binding
- Enforce code and application policies requiring parameterized database access
- Monitor for unusual database errors or access patterns associated with the address-list functionality
Automated code review tools may help flag unsafe query construction patterns.

