CVE-2026-31843: goodoneuz/pay-uz: the /payment/api/editable/update endpoint overwrites existing PHP payment hook files
The goodoneuz/pay-uz Laravel package (<= 2.2.24) contains a critical vulnerability in the /payment/api/editable/update endpoint that allows unauthenticated attackers to overwrite existing PHP payment hook files. The endpoint is exposed via Route::any() without authentication middleware, enabling remote access without credentials.
Published Apr 16, 2026 · Updated Jul 27, 2026
Affected packages
goodoneuz/pay-uz
- Ecosystem
- Composer (PHP)
- Affected
- <= 2.2.24
- Fixed in
- 3.0.0
- Check
composer show goodoneuz/pay-uz
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
The goodoneuz/pay-uz Laravel package (<= 2.2.24) contains a critical vulnerability in the /payment/api/editable/update endpoint that allows unauthenticated attackers to overwrite existing PHP payment hook files. The endpoint is exposed via Route::any() without authentication middleware, enabling remote access without credentials. User-controlled input is directly written into executable PHP files using file_put_contents(). These files are later executed via require() during normal payment processing workflows, resulting in remote code execution under default application behavior. The payment secret token mentioned by the vendor is unrelated to this endpoint and does not mitigate the vulnerability.
Credited to shaxzodbek-uzb.
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-31843
- https://github.com/goodoneuz/pay-uz/blob/master/src/Http/Controllers/ApiController.php
- https://github.com/goodoneuz/pay-uz/blob/master/src/routes/web.php
- https://github.com/shaxzodbek-uzb/pay-uz
- https://packagist.org/packages/goodoneuz/pay-uz
- https://github.com/shaxzodbek-uzb/pay-uz/pull/73
- https://github.com/shaxzodbek-uzb/pay-uz/releases/tag/3.0.0
- https://github.com/advisories/GHSA-m5wg-cjgh-223j
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
