Cyber Resilience

CVE-2025-58159

RCE in Wegia ≤ 3.4.11

Public PoCRCE
Published
29 August 2025
Modified
17 June 2026
Patch / advisory
CVSS Score v3.1 9.9
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS Score 0.0074 51th percentile
Risk Priority 70 floored blend · peak EPSS

Summary

CVE-2025-58159 is a critical-severity Code Injection (CWE-94) vulnerability in Wegia Wegia. Its CVSS base score is 9.9 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Command and Scripting Interpreter (T1059); ranked in the top 49% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2025-58159 is a remote code execution vulnerability in WeGIA, a web manager for charitable institutions, affecting versions prior to 3.4.11. The flaw arises from improper validation of uploaded files, which permits attackers to upload files with arbitrary filenames, including those ending in .php. These files are written directly to disk without sufficient sanitization or extension restrictions, allowing a spreadsheet file appended with PHP code to be executed on the server and achieve arbitrary code execution. This issue results from inadequate mitigation of CVE-2025-22133 and is associated with CWE-94 (code injection) and CWE-434 (unrestricted upload of files).

The vulnerability can be exploited remotely over the network (AV:N) with low attack complexity (AC:L), requiring only low privileges (PR:L) and no user interaction (UI:N). Exploitation changes scope (S:C) and yields high impacts on confidentiality, integrity, and availability (C:H/I:H/A:H), earning a CVSS v3.1 base score of 9.9. An authenticated attacker with minimal access could thus execute arbitrary code on the server.

The issue has been patched in WeGIA version 3.4.11. Additional details on the advisory are available at https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-wj2c-237g-cgqp.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

WeGIA is a Web manager for charitable institutions. Prior to version 3.4.11, a remote code execution vulnerability was identified, caused by improper validation of uploaded files. The application allows an attacker to upload files with arbitrary filenames, including those with…

more

a .php extension. Because the uploaded file is written directly to disk without adequate sanitization or extension restrictions, a spreadsheet file followed by PHP code can be uploaded and executed on the server, leading to arbitrary code execution. This is due to insufficient mitigation of CVE-2025-22133. This issue has been patched in version 3.4.11.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
T1059.002 AppleScript Execution
Adversaries may abuse AppleScript for execution.
T1059.004 Unix Shell Execution
Adversaries may abuse Unix shell commands and scripts for execution.
T1059.005 Visual Basic Execution
Adversaries may abuse Visual Basic (VB) for execution.
T1059.006 Python Execution
Adversaries may abuse Python commands and scripts for execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2025-58745Same product: Wegia Wegia
CVE-2025-22133Same product: Wegia Wegia
CVE-2025-6695Same product: Wegia Wegia
CVE-2025-6694Same product: Wegia Wegia
CVE-2025-6696Same product: Wegia Wegia
CVE-2025-6698Same product: Wegia Wegia
CVE-2025-6697Same product: Wegia Wegia
CVE-2025-6699Same product: Wegia Wegia
CVE-2026-25510Shared CWE-434, CWE-94
CVE-2024-40546Shared CWE-434, CWE-94

Affected Assets

wegia
wegia
≤ 3.4.11

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V5.1.1
  • V1.3.1

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation finds code paths that accept and execute externally influenced strings.

Input validation directly stops untrusted data from being used to construct executable code without neutralization.

Malicious-code protection at entry points blocks dangerous file types from being accepted and executed.

Least privilege limits the damage an injected code fragment can perform once executed.

Least functionality restricts the file types and automatic processing capabilities the system will accept.

Requiring documented secure development standards and tools enforces use of safe code-generation APIs and escaping.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-05 mostly match
prevents

Restricting execution of unauthorized software directly blocks dangerous uploaded files from running.

PR.PS-06 mostly match
prevents

PR.PS-06's SDLC practices directly target injection flaws via secure coding and testing (mostly), yet as a single broad outcome it leaves many code-generation specifics unaddressed (partial).

PR.PS-01 partial match
prevents

Hardened configuration baselines can enforce allowed file types and processing rules.

PR.DS-10 none match
prevents

PR.DS-10 protects runtime data confidentiality/integrity but has no bearing on neutralizing externally influenced input during code generation, so neither direction shows any preventive effect.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Configuration and acceptance testing verify that file-upload handling enforces allowed types and does not permit dangerous content to be stored or executed.

prevents

Secure-coding guidelines and security testing explicitly address restrictions on allowed file types and upload handling, reducing the risk that dangerous file uploads are accepted without validation.

prevents

Banning unapproved code samples and unauthenticated web services, combined with secure-coding standards and SAST, prevents the dynamic generation or inclusion of attacker-supplied code.

prevents

Mandated testing for malicious content and known vulnerabilities reduces the likelihood that an outsourced component will contain or accept dangerous file types that could later be uploaded or executed.

mitigates

Application allow-listing and pre-use scanning of received files directly blocks the introduction of executable content that has not been vetted, eliminating the primary vector for unrestricted dangerous file uploads.

References