CVE-2026-56831: Input Validation

Published Sep 11, 2026
·
Updated

Summary

The Shopper Framework discount management functionality accepts negative discount values without server-side validation.

It was confirmed that negative fixed-amount discounts can be created through the administrative interface, persisted to the database, and subsequently processed by the cart/order calculation pipeline.

The application appears to assume that discount values are always positive but does not enforce this assumption during creation, storage, or calculation.

As a result, malformed discount records can influence financial calculations and produce unintended order totals.

---

Affected Product

Package: shopper/framework

Version Tested: 2.8.1

---

Vulnerability Type

Business Logic Vulnerability Improper Input Validation (CWE-20)

---

Description

While reviewing the discount functionality, it was discovered that the application accepts negative discount values through the administrative interface.

Example values tested:

text -50.00 -99,999,999.00

The application accepted these values without validation and stored them in the database.

Example records observed in the shdiscounts table:

text 1 | QCZ5Y3HESM | fixedamount | -5000 4 | TOZKAHCB4S | fixedamount | -9999999900

This demonstrates that negative discount values are successfully persisted.

---

Steps to Reproduce

1. Create a Discount

Login as an administrator.

Navigate to:

text /cpanel/discounts

Create a new discount with the following values:

text Type: fixedamount Value: -99999999

Save the discount.

2. Observe Successful Creation

The discount is accepted by the application and displayed in the administration interface.

Example:

text Code: TOZKAHCB4S Amount: -$99,999,999.00

3. Verify Database Persistence

Inspect the database:

sql select from shdiscounts;

Observed entry:

text TOZKAHCB4S | fixedamount | -9999999900

---

Technical Analysis

Discount Calculation

File:

text vendor/shopper/cart/src/Discounts/DiscountCalculator.php

Observed code:

php $fixedAmount = $discount->value;

The value is later processed without validation:

php $fixedAmount = min($fixedAmount, $applicableSubtotal);

When a negative value is supplied:

php min(-9999999900, 10000)

returns:

php -9999999900

allowing the negative value to continue through the calculation pipeline.

The resulting adjustment values are inserted into the database:

php CartLineAdjustment::query()->insert($adjustments);

No validation was identified to ensure that discount amounts are positive before calculations occur.

---

Final Total Calculation

File:

text vendor/shopper/cart/src/Pipelines/Calculate.php

Observed logic:

php $context->total = max( 0, $context->taxInclusive ? $context->subtotal - $context->discountTotal : $context->subtotal - $context->discountTotal + $context->taxTotal );

Because negative discount values are allowed to reach this stage, financial calculations are performed using malformed discount data.

Example:

text Subtotal = 10000 DiscountTotal = -5000

Resulting calculation:

text 10000 - (-5000)

Result:

text 15000

This demonstrates that negative discount values directly affect order total calculations.

---

Impact

The following was confirmed:

Negative discount values are accepted. Negative discount values are persisted. Negative discount values are processed by the discount calculation engine. Negative discount values affect order total calculations.

Potential consequences include:

Incorrect pricing calculations. Financial data integrity issues. Unexpected order totals. Violated assumptions within downstream pricing logic. Future vulnerabilities if additional components assume discount values are always positive.

Because Shopper is a headless e-commerce administration framework and does not ship with a customer-facing storefront, it was not verified a customer-facing exploitation path.

However, malformed discount records currently propagate through pricing calculations without validation.

---

Recommendation

Implement server-side validation enforcing positive discount values before persistence and before entering the calculation pipeline.

Suggested validation:

Fixed Amount Discounts

text value > 0

Percentage Discounts

text 0 < value <= 100

Additionally, existing discount records should be validated before calculation to prevent malformed data from influencing pricing logic.

---

Environment

text Shopper Framework 2.8.1 Laravel 12.61.1 PHP 8.4.16 SQLite

Affected Software

1 affected componentFixes available
composer/shopper/framework<2.9.0
2.9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/shopper/framework to a version that resolves this vulnerability.

    Fixed in 2.9.0
  2. Configuration

    Implement server-side validation in the discount creation/admin flow so that fixed_amount discount records are rejected unless the discount value is positive (specifically enforce the condition shown in the material: 0 < value <= 100), and ensure invalid records cannot be persisted into the database or enter the pricing calculation pipeline.

    shopper/framework Discount value validation (server-side) for fixed_amount discounts = enforce 0 < value <= 100 (reject negative values)
  3. Operational

    Inspect existing discount records in the database and validate them before calculation so malformed/negative discount values (e.g., fixed_amount values like -5000 or -9999999900 that were observed) cannot influence financial calculations; remove or correct any existing invalid persisted discount values before running order/cart calculations.

Event History

Sep 11, 2026
Advisory Published
via GitHub·09:28 PM
Data Sourced
via GitHub·09:28 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who can exploit this issue?

An attacker needs access to the administrative interface that can create or manage discounts. The reported attack vector requires network access and low privileges; no user interaction is required.

2

How can I check whether negative discounts have already been created?

Review discount records in the sh_discounts table for fixed_amount entries with negative stored values. The report observed values such as -5000 after a negative amount was accepted through the administrative interface.

3

Which version is confirmed affected?

The issue was confirmed in shopper/framework version 2.8.1. The provided data does not establish an affected version range or identify a fixed version.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203