Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsStudyTraining
ProjectsChecklistsAI RankingsNewsletterStatusTagsAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Study
Training
Projects
Checklists
AI Rankings
Newsletter
Status
Tags
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

735+ Articles
120+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2026-31843: Laravel pay-uz Unauthenticated PHP File Overwrite RCE
CVE-2026-31843: Laravel pay-uz Unauthenticated PHP File Overwrite RCE

Critical Security Alert

This vulnerability is actively being exploited. Immediate action is recommended.

SECURITYCRITICALCVE-2026-31843

CVE-2026-31843: Laravel pay-uz Unauthenticated PHP File Overwrite RCE

A critical unauthenticated remote code execution vulnerability (CVSS 9.8) in the goodoneuz/pay-uz Laravel payment package allows attackers to overwrite PHP hook files via an exposed endpoint with no authentication required.

Dylan H.

Security Team

April 17, 2026
3 min read

Affected Products

  • goodoneuz/pay-uz <= 2.2.24

Executive Summary

A critical remote code execution vulnerability (CVE-2026-31843) has been identified in the goodoneuz/pay-uz Laravel payment integration package, affecting all versions up to and including 2.2.24. The flaw carries a CVSS score of 9.8 and requires no authentication to exploit.

The vulnerability stems from a /payment/api/editable/update endpoint registered via Route::any() with no authentication middleware. An unauthenticated attacker can POST malicious PHP code to this endpoint, causing it to be written directly into an existing payment hook file. The injected code is then executed during the next legitimate payment workflow that triggers the hook.

Applications using this package for payment processing (UzCard, Humo, PayMe, Click integrations) are at direct risk of full server compromise.


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-31843
CVSS Score9.8 (Critical)
CWECWE-434 — Unrestricted Upload of File with Dangerous Type
TypeRemote Code Execution via File Overwrite
Attack VectorNetwork
Privileges RequiredNone (unauthenticated)
User InteractionNone
ScopeChanged
Confidentiality ImpactHigh
Integrity ImpactHigh
Availability ImpactHigh
Patch AvailableUpdate to 2.2.25+ or remove the package

Affected Versions

PackageAffected VersionsFixed Version
goodoneuz/pay-uz<= 2.2.242.2.25+

Technical Analysis

Root Cause

The goodoneuz/pay-uz package registers a route for updating payment hook configuration at /payment/api/editable/update. This route is defined with Route::any(), accepting all HTTP methods, and is registered without any authentication or authorization middleware.

The endpoint accepts user-supplied PHP code in the request body and writes it to existing payment hook files using PHP's file_put_contents(). These hook files are subsequently included via require() statements embedded in the normal payment processing flow.

Attack Flow

1. Attacker identifies a Laravel app using goodoneuz/pay-uz <= 2.2.24
2. Attacker sends POST to: /payment/api/editable/update
   Body includes malicious PHP that calls passthru() or similar
3. Application writes attacker's PHP to existing payment hook file
4. Attacker triggers a payment flow (or waits for one to occur)
5. Hook file is require()'d, executing attacker's PHP with app-level privileges
6. Full Remote Code Execution achieved — web shell established

Why This Is Severe

The absence of authentication on a write-capable endpoint that directly modifies includable PHP files is a textbook unauthenticated RCE scenario. The exploit requires a single HTTP POST — no credentials, tokens, or prior access needed.

The Route::any() registration accepts GET, POST, PUT, PATCH, DELETE, and HEAD, maximizing accessibility to automated scanners and exploit kits.


Impact Assessment

Impact AreaDescription
Remote Code ExecutionArbitrary PHP code executed with web server privileges
Full Application CompromiseAttacker can read, modify, or delete any application file
Database AccessLaravel .env credentials accessible — full DB dump possible
Payment Data ExfiltrationDirect access to payment processing logic and transaction data
Persistent BackdoorWebshell survives restarts; attacker maintains persistent access
Lateral MovementPivot from web server into internal network infrastructure
Supply Chain RiskShared hosting environments expose other co-hosted applications

Immediate Remediation

Step 1: Update or Remove the Package

# Update to fixed version
composer require goodoneuz/pay-uz:^2.2.25
 
# Or remove if no longer needed
composer remove goodoneuz/pay-uz

Step 2: Check for Exploitation

# Search for recently modified PHP files in the project (excluding vendor)
find /path/to/laravel -name "*.php" -newer /path/to/laravel/artisan \
  -type f -not -path "*/vendor/*"
 
# Review web server logs for requests to the vulnerable endpoint
grep "/payment/api/editable/update" /var/log/nginx/access.log
grep "/payment/api/editable/update" /var/log/apache2/access.log

Step 3: Block the Endpoint at the Web Server

If an immediate update is not possible, block the route at the web server:

# Nginx: deny requests to the vulnerable endpoint
location ~* ^/payment/api/editable/update {
    deny all;
    return 403;
}
# Apache: deny access to the vulnerable endpoint
<Location "/payment/api/editable/update">
    Require all denied
</Location>

Step 4: Rotate All Credentials

If exploitation cannot be ruled out, treat all credentials as compromised:

# Regenerate Laravel application key
php artisan key:generate
 
# Rotate .env database passwords, API keys, and payment gateway credentials

Detection Indicators

IndicatorDescription
POST requests to /payment/api/editable/updateDirect exploitation attempts in access logs
Unexpected PHP content in payment hook filesEvidence of file overwrite
Webshell patterns in PHP filesPost-exploitation implants
Outbound connections from web process to unexpected IPsC2 communication from webshell
New files in storage/ or app/Payments/ directoriesDropped payloads or persistence files

Post-Remediation Checklist

  1. Update goodoneuz/pay-uz to version 2.2.25 or later
  2. Audit all payment hook files for injected code
  3. Scan all PHP files for webshells and backdoors
  4. Review web server logs for prior exploitation of the endpoint
  5. Rotate all application credentials (DB, API keys, payment gateway)
  6. Regenerate Laravel application key and invalidate all sessions
  7. Deploy WAF rules to block writes to sensitive endpoints
  8. Enable file integrity monitoring on the application directory
  9. Review all unauthenticated routes in the application's route files

References

  • NVD — CVE-2026-31843
  • goodoneuz/pay-uz on Packagist
#CVE-2026-31843#Laravel#PHP#Remote Code Execution#Unauthenticated#Payment Processing#File Overwrite

Related Articles

CVE-2026-6264: Talend JobServer Unauthenticated RCE via JMX Port

A critical CVSS 9.8 vulnerability in Talend JobServer and Talend Runtime exposes an unauthenticated JMX monitoring port, allowing remote attackers to execute arbitrary code without credentials. Mitigation requires enforcing TLS client authentication on the JMX interface.

7 min read

CVE-2026-6057: FalkorDB Browser Unauthenticated Path Traversal RCE

FalkorDB Browser 1.9.3 contains a critical unauthenticated path traversal vulnerability in its file upload API that allows remote attackers to write...

6 min read

CVE-2026-1830: WordPress Quick Playground Plugin RCE via Unauthenticated File Upload

A critical CVSS 9.8 vulnerability in the Quick Playground WordPress plugin (versions up to 1.3.1) allows unauthenticated attackers to upload arbitrary...

6 min read
Back to all Security Alerts