6.5
MEDIUM CVSS 3.1
CVE-2026-56831
Shopper Framework Improper Input Validation in Discount Management
Description

## 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 `sh_discounts` table: ```text 1 | QCZ5Y3HESM | fixed_amount | -5000 4 | TOZKAHCB4S | fixed_amount | -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: fixed_amount 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 sh_discounts; ``` Observed entry: ```text TOZKAHCB4S | fixed_amount | -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 ```

INFO

Published Date :

Sept. 11, 2026, 9:28 p.m.

Last Modified :

Sept. 11, 2026, 9:28 p.m.

Remotely Exploit :

Yes !

Source :

github-security-advisories
Affected Products

The following products are affected by CVE-2026-56831 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

No affected product recoded yet

CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 MEDIUM github
Solution
Implement server-side validation for discount values and sanitize existing data.
  • Validate discount values are positive before saving.
  • Validate percentage discounts are between 0 and 100.
  • Sanitize existing discount records before calculation.
  • Update discount calculation logic.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-56831.

URL Resource
https://github.com/shopperlabs/shopper/security/advisories/GHSA-5vf4-452p-jjhf
https://github.com/advisories/GHSA-5vf4-452p-jjhf
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-56831 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-56831 weaknesses.

CAPEC-3: Using Leading 'Ghost' Character Sequences to Bypass Input Filters Using Leading 'Ghost' Character Sequences to Bypass Input Filters CAPEC-7: Blind SQL Injection Blind SQL Injection CAPEC-8: Buffer Overflow in an API Call Buffer Overflow in an API Call CAPEC-9: Buffer Overflow in Local Command-Line Utilities Buffer Overflow in Local Command-Line Utilities CAPEC-10: Buffer Overflow via Environment Variables Buffer Overflow via Environment Variables CAPEC-13: Subverting Environment Variable Values Subverting Environment Variable Values CAPEC-14: Client-side Injection-induced Buffer Overflow Client-side Injection-induced Buffer Overflow CAPEC-22: Exploiting Trust in Client Exploiting Trust in Client CAPEC-23: File Content Injection File Content Injection CAPEC-24: Filter Failure through Buffer Overflow Filter Failure through Buffer Overflow CAPEC-28: Fuzzing Fuzzing CAPEC-31: Accessing/Intercepting/Modifying HTTP Cookies Accessing/Intercepting/Modifying HTTP Cookies CAPEC-42: MIME Conversion MIME Conversion CAPEC-43: Exploiting Multiple Input Interpretation Layers Exploiting Multiple Input Interpretation Layers CAPEC-45: Buffer Overflow via Symbolic Links Buffer Overflow via Symbolic Links CAPEC-46: Overflow Variables and Tags Overflow Variables and Tags CAPEC-47: Buffer Overflow via Parameter Expansion Buffer Overflow via Parameter Expansion CAPEC-52: Embedding NULL Bytes Embedding NULL Bytes CAPEC-53: Postfix, Null Terminate, and Backslash Postfix, Null Terminate, and Backslash CAPEC-63: Cross-Site Scripting (XSS) Cross-Site Scripting (XSS) CAPEC-64: Using Slashes and URL Encoding Combined to Bypass Validation Logic Using Slashes and URL Encoding Combined to Bypass Validation Logic CAPEC-67: String Format Overflow in syslog() String Format Overflow in syslog() CAPEC-71: Using Unicode Encoding to Bypass Validation Logic Using Unicode Encoding to Bypass Validation Logic CAPEC-72: URL Encoding URL Encoding CAPEC-73: User-Controlled Filename User-Controlled Filename CAPEC-78: Using Escaped Slashes in Alternate Encoding Using Escaped Slashes in Alternate Encoding CAPEC-79: Using Slashes in Alternate Encoding Using Slashes in Alternate Encoding CAPEC-80: Using UTF-8 Encoding to Bypass Validation Logic Using UTF-8 Encoding to Bypass Validation Logic CAPEC-81: Web Server Logs Tampering Web Server Logs Tampering CAPEC-83: XPath Injection XPath Injection CAPEC-85: AJAX Footprinting AJAX Footprinting CAPEC-88: OS Command Injection OS Command Injection CAPEC-101: Server Side Include (SSI) Injection Server Side Include (SSI) Injection CAPEC-104: Cross Zone Scripting Cross Zone Scripting CAPEC-108: Command Line Execution through SQL Injection Command Line Execution through SQL Injection CAPEC-109: Object Relational Mapping Injection Object Relational Mapping Injection CAPEC-110: SQL Injection through SOAP Parameter Tampering SQL Injection through SOAP Parameter Tampering CAPEC-120: Double Encoding Double Encoding CAPEC-135: Format String Injection Format String Injection CAPEC-136: LDAP Injection LDAP Injection CAPEC-153: Input Data Manipulation Input Data Manipulation CAPEC-182: Flash Injection Flash Injection CAPEC-209: XSS Using MIME Type Mismatch XSS Using MIME Type Mismatch CAPEC-230: Serialized Data with Nested Payloads Serialized Data with Nested Payloads CAPEC-231: Oversized Serialized Data Payloads Oversized Serialized Data Payloads CAPEC-250: XML Injection XML Injection CAPEC-261: Fuzzing for garnering other adjacent user/sensitive data Fuzzing for garnering other adjacent user/sensitive data CAPEC-267: Leverage Alternate Encoding Leverage Alternate Encoding CAPEC-473: Signature Spoof Signature Spoof CAPEC-588: DOM-Based XSS DOM-Based XSS CAPEC-664: Server Side Request Forgery Server Side Request Forgery

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-56831 vulnerability anywhere in the article.

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.