{"id":"GHSA-78vr-q6cf-c7p6","aliases":["GHSA-78vr-q6cf-c7p6"],"related":[],"kind":"vulnerability","state":"published","title":"Craft Commerce: Partial Payment Amount Without Lower Bound Validation","summary":"### Summary\n\nThe `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. \n\n### Details\n\nWhen 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.\n\n<img width=\"690\" height=\"80\" alt=\"image\" src=\"https://github.com/user-attachments/assets/78b653a6-ccae-4ce4-b71b-fc38a7757d73\" />\n\n<img width=\"761\" height=\"200\" alt=\"image\" src=\"https://github.com/user-attachments/assets/665a235f-62c2-45fe-aa41-c3f266881c77\" />\n\n### PoC\n\n_Complete instructions, including specific configuration details, to reproduce the vulnerability._\n<img width=\"606\" height=\"144\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a04a6de2-7c5f-4837-aed6-58756e246b80\" />\n\n\n### Impact\nOn 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.\n\n**Remediation**\n\n<img width=\"718\" height=\"98\" alt=\"image\" src=\"https://github.com/user-attachments/assets/aa64b696-9749-45e4-97f6-8d7299cdf1d6\" />","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### Summary\n\nThe `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. \n\n### Details\n\nWhen 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.\n\n<img width=\"690\" height=\"80\" alt=\"image\" src=\"https://github.com/user-attachments/assets/78b653a6-ccae-4ce4-b71b-fc38a7757d73\" />\n\n<img width=\"761\" height=\"200\" alt=\"image\" src=\"https://github.com/user-attachments/assets/665a235f-62c2-45fe-aa41-c3f266881c77\" />\n\n### PoC\n\n_Complete instructions, including specific configuration details, to reproduce the vulnerability._\n<img width=\"606\" height=\"144\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a04a6de2-7c5f-4837-aed6-58756e246b80\" />\n\n\n### Impact\nOn 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.\n\n**Remediation**\n\n<img width=\"718\" height=\"98\" alt=\"image\" src=\"https://github.com/user-attachments/assets/aa64b696-9749-45e4-97f6-8d7299cdf1d6\" />","format":"markdown","source":"ghsa"}],"published":"2026-06-19T21:15:23.000Z","modified":"2026-09-10T03:50:48.689Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"}],"cwes":["CWE-20","CWE-1284"],"affected":[{"ranges":[{"type":"ecosystem","introduced":"5.0.0","status":"affected","fixed":"5.6.5"}],"ecosystem":"Packagist","package":"craftcms/commerce","purl":"pkg:composer/craftcms/commerce","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0","status":"affected","fixed":"4.11.2"}],"ecosystem":"Packagist","package":"craftcms/commerce","purl":"pkg:composer/craftcms/commerce","source":"ghsa"}],"references":[{"url":"https://github.com/craftcms/commerce/security/advisories/GHSA-78vr-q6cf-c7p6","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/commerce/commit/9a88392b3074aa132a9455d4f4b582411df52c74","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/commerce","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-78vr-q6cf-c7p6","url":"https://github.com/advisories/GHSA-78vr-q6cf-c7p6","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:48.689Z"}],"updatedAt":"2026-11-25T22:56:31.437Z"}