# CVE-2026-31843: goodoneuz/pay-uz Unauthenticated PHP File Overwrite via /payment/api/editable/update Leading to Remote Code Execution

> Unauthenticated attackers can overwrite PHP files via an unprotected API endpoint, leading to remote code execution in the pay-uz Laravel package.

- **Severity:** Critical 10.0 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Apr 2026
- **Updated:** 10 Aug 2026
- **Also known as:** GHSA-m5wg-cjgh-223j

## What is CVE-2026-31843?

CVE-2026-31843 is a critical missing authorization vulnerability in goodoneuz pay-uz, published on 16 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-284 (Improper Access Control)

## Which versions are affected by CVE-2026-31843?

2 open source packages ship an affected version, including goodoneuz/pay-uz.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `goodoneuz/pay-uz` | Packagist | All versions | 3.0.0 |
| `goodoneuz/pay-uz` | Packagist | All versions | 3.0.0 |

## How do I fix CVE-2026-31843?

Upgrade goodoneuz/pay-uz to 3.0.0 or later.

## Is CVE-2026-31843 being exploited?

There is no known exploitation of CVE-2026-31843 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-31843 and fix it if it is affected.

What it is: CVE-2026-31843 is a critical missing authorization vulnerability in goodoneuz pay-uz, published on 16 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-31843 in the wild and no public exploit code.

Affected packages and fixed versions:
- goodoneuz/pay-uz (Packagist): affected all versions; fixed in 3.0.0
- goodoneuz/pay-uz (Packagist): affected all versions; fixed in 3.0.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-31843/ (Markdown: https://insights.sbomify.com/CVE-2026-31843/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-31843
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-31843
- OSV: https://osv.dev/vulnerability/CVE-2026-31843

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-31843/
Summaries are generated and may contain mistakes; the official description above is the record.
