Security Resilience

CVE-2025-58745

RCE in Wegia ≤ 3.4.11

Public PoCRCE
Published
08 September 2025
Modified
18 October 2026
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.0077 56th percentile
Risk Priority 69 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

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

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 44% 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-58745 is an arbitrary file upload vulnerability in WeGIA, an open-source web manager for charitable institutions. The issue stems from an insufficient fix for the prior CVE-2025-22133, where WeGIA's MIME type checks for Excel files at the endpoint `/html/socio/sistema/controller/controla_xlsx.php` can be bypassed. Attackers can craft a PHP file with Excel magic bytes to evade detection, enabling webshell uploads. The vulnerability affects WeGIA versions prior to 3.4.11 and carries a CVSS v3.1 base score of 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H), linked to CWEs-94 (code injection) and CWE-434 (unrestricted upload).

Low-privileged remote users (PR:L) can exploit this over the network with low complexity and no user interaction. By uploading a malicious PHP file disguised as an Excel spreadsheet, attackers gain remote code execution on the server, achieving high confidentiality, integrity, and availability impacts with changed scope.

The GitHub Security Advisory (GHSA-hq96-gvmx-qrwp) recommends updating to WeGIA version 3.4.11, which includes a proper fix for the file upload validation bypass.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

WeGIA is a Web manager for charitable institutions. The fix for CVE-2025-22133 was not enough to remediate the arbitrary file upload vulnerability. The WeGIA only check MIME types for Excel files at endpoint `/html/socio/sistema/controller/controla_xlsx.php`, which can be bypassed by using…

more

magic bytes of Excel file in a PHP file. As a result, attacker can upload webshell to the server for remote code execution. Version 3.4.11 contains an updated fix.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1505.003 Web Shell Persistence
Adversaries may backdoor web servers with web shells to establish persistent access to systems.
T1559.003 XPC Services Execution
Adversaries can provide malicious content to an XPC service daemon for local code execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2025-22133Same product: Wegia Wegia
CVE-2025-58159Same product: Wegia Wegia
CVE-2025-6694Same product: Wegia Wegia
CVE-2025-6697Same product: Wegia Wegia
CVE-2025-6695Same product: Wegia Wegia
CVE-2025-6696Same product: Wegia Wegia
CVE-2025-6698Same product: Wegia Wegia
CVE-2025-6699Same product: Wegia Wegia
CVE-2023-5604Shared CWE-434, CWE-94
CVE-2023-40050Shared 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)

Our mappings, made for this CVE.

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)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-05 mostly match
blocks

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

PR.PS-06 mostly match
blocks

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
blocks

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

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

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

A.8.29's programme of code review, static analysis, dynamic testing and penetration testing is the complete pre-production discovery set for code injection: eval/dynamic-execution sinks are visible to SAST, code review catches them, and penetration testing reaches the externally exploitable instances, with no nameable remainder.

finds

A.5.21 governs supplier relationships and supply chain security requirements, not the technical detection of file upload vulnerabilities in deployed code.

prevents

Training technical teams in secure coding practices (per A.6.3's education and training guidance) helps developers avoid constructing code from untrusted input without neutralization, but the effect is a minority one because the clause mandates a general awareness/training practice rather than a specific secure-coding mechanism, and developers remain fallible.

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

A.8.30 carries its effect through the secure-development practices its contract requires of the supplier (8.25 to 8.29), so it reduces ordinary software weaknesses like code injection in delivered code the way those practices do, at `partial` -- the effect depends on the supplier's faithful implementation of those practices, which is fallible, and the clause sits at its declared ceiling of `partial` on this verb.

blocks

A.8.7 can block exploitation of CWE-434 when uploaded dangerous files contain malware that its scanning detects before use, but because it does not restrict file types itself and malware detection misses unknown or custom scripts, only a minority of instances are stopped.

References