Kestrel
대시보드로 돌아가기
CVE-2026-56831MEDIUM· 6.5GHSA대응게시일: 2026. 09. 11.수정일: 2026. 09. 11.

Shopper: Negative discount values accepted and propagated through order calculation pipeline

위협 신호 · CVSS · EPSS · KEV

정기 패치· 높은 악용 신호 없음
CVSS
6.5medium

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한60일 이내CISA SSVC 기준

계획된 패치 주기 내 조치(60일 이내)

외부 노출· KEV 미등재 · 자동화 어려움 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한낮음
사용자 상호작용불필요
범위불변
영향
기밀성 영향없음
무결성 영향높음
가용성 영향없음
버전별 점수
CVSS 3.16.5MODERATE
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

상세 설명

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
1-50.00
2-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
11 | QCZ5Y3HESM | fixed_amount | -5000
24 | 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
1/cpanel/discounts

Create a new discount with the following values:

text
1Type: fixed_amount
2Value: -99999999

Save the discount.

2. Observe Successful Creation

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

Example:

bash
1Code: TOZKAHCB4S
2Amount: -$99,999,999.00

3. Verify Database Persistence

Inspect the database:

sql
1select * from sh_discounts;

Observed entry:

text
1TOZKAHCB4S | fixed_amount | -9999999900

Technical Analysis

Discount Calculation

File:

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

Observed code:

bash
1$fixedAmount = $discount->value;

The value is later processed without validation:

bash
1$fixedAmount = min($fixedAmount, $applicableSubtotal);

When a negative value is supplied:

text
1min(-9999999900, 10000)

returns:

text
1-9999999900

allowing the negative value to continue through the calculation pipeline.

The resulting adjustment values are inserted into the database:

bash
1CartLineAdjustment::query()->insert($adjustments);

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


Final Total Calculation

File:

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

Observed logic:

bash
1$context->total = max(
2 0,
3 $context->taxInclusive
4 ? $context->subtotal - $context->discountTotal
5 : $context->subtotal - $context->discountTotal + $context->taxTotal
6);

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

Example:

text
1Subtotal = 10000
2DiscountTotal = -5000

Resulting calculation:

text
110000 - (-5000)

Result:

text
115000

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
1value > 0

Percentage Discounts

text
10 < value <= 100

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


Environment

text
1Shopper Framework 2.8.1
2Laravel 12.61.1
3PHP 8.4.16
4SQLite

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.