Summary
A remotely reachable authorization weakness in osCommerce's Virtual Gift Card Basket may allow a caller to manipulate the products_id argument processed by actionGiftCard. If the application does not verify access to the referenced resource, this could let an attacker perform an action without the required authorization.
Affected context
The issue is reported in osCommerce 4.14.63493, in the actionGiftCard function of lib/frontend/controllers/CatalogController.php for the Virtual Gift Card Basket component. It becomes relevant when the function handles a caller-controlled products_id without adequately checking whether the caller is authorized to perform the requested action on the referenced product or gift card.
Exploit preconditions
- Attack surface: A remotely reachable application route that invokes
actionGiftCard - Required access: Network access to the route; whether authentication is required is not specified
- Trigger point: Handling of the
products_idargument by the gift card action - Why exploitation is possible: Authorization may not be correctly enforced for the resource identified by the caller-controlled value
Why this happens
The reported weakness involves authorization decisions associated with a user-controlled object identifier. If the application trusts products_id without checking the caller's permission for the referenced resource, an attacker may be able to bypass access controls. This is consistent with CWE-639: Authorization Bypass Through User-Controlled Key and the broader CWE-285: Improper Authorization.
Potential impact
- An attacker may perform gift-card-related actions without the required authorization
- Depending on the affected action and application controls, unauthorized access to or manipulation of related basket data could occur
- The weakness could undermine access-control boundaries for affected functionality
General mitigation guidance
Defensive patterns include treating identifiers received from clients as untrusted and enforcing authorization on the server for every requested resource and action. Bind resource access to the authenticated principal where applicable, deny by default, and avoid relying on possession or knowledge of an identifier as proof of permission. Keep authorization checks close to the operation they protect and apply least privilege to application components.
How teams detect issues like this
- Review controller actions and service methods that accept client-supplied identifiers for resource-level authorization checks
- Use static analysis or code review rules to flag authorization decisions based solely on request parameters
- Test access-control policies across users and resources, including attempts to reference resources outside the caller's permissions
- Enforce policy checks in shared service or data-access layers so routes cannot omit them

