GitHub Advisoryadvisory · Packagist

GHSA-78vr-q6cf-c7p6 Craft Commerce: Partial Payment Amount Without Lower Bound Validation

MEDIUM Published 2026-06-19 Modified 2026-06-19 Official page ↗
Ecosystem
Packagist
Packages
craftcms/commerce
Severity
Moderate
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Weaknesses
CWE-1284, CWE-20
Reviewed
2026-06-19

Affected packages

• Packagist craftcms/commerce: >= 5.0.0, < 5.6.5 → fixed in 5.6.5 • Packagist craftcms/commerce: >= 4.0.0, < 4.11.2 → fixed in 4.11.2

Description

Summary The `Order::setPaymentAmount()` method accepts any float value without enforcing a minimum positive amount. The PaymentsController casts the user-supplied 'paymentAmount' parameter directly to float with no lower-bound check. Details When the store has 'Allow Partial Payment on Checkout' enabled, a user can submit a payment amount of $0.00 or even a negative value, potentially marking orders as paid without a valid transaction. PoC _Complete instructions, including specific configuration details, to reproduce the vulnerability._ Impact On stores with partial payment enabled, a customer may be able to set an arbitrarily small payment amount. Gateway behavior varies — some will process $0.00 transactions, effectively giving free order fulfillment. Remediation

Related

Weakness · CWE (2)

  • CWE-1284 Improper Validation of Specified Quantity in Input weakness
  • CWE-20 Improper Input Validation weakness

References