goodoneuz/pay-uz: the /payment/api/editable/update endpoint overwrites existing PHP payment hook files
Impact
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…
Source excerpt · OSVThese files are later executed via require() during normal payment processing workflows, resulting in remote code execution under default application behavior.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| Earlier releases before 3.0.0Ecosystem versions | 3.0.0 |
Version evidence: OSV · GHSA-m5wg-cjgh-223j
View original version evidence (47 explicit versions)
Original source description
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.
References
- Security advisory nvd.nist.gov/vuln/detail/CVE-2026-31843
- Patch github.com/shaxzodbek-uzb/pay-uz/pull/73
- Source reference github.com/goodoneuz/pay-uz/blob/master/src/Http/Controllers/ApiController.php
- Source reference github.com/goodoneuz/pay-uz/blob/master/src/routes/web.php
- Source reference github.com/shaxzodbek-uzb/pay-uz
- Release notes github.com/shaxzodbek-uzb/pay-uz/releases/tag/3.0.0
- Source reference packagist.org/packages/goodoneuz/pay-uz