☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Wegia logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 🐛 CWE-89
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-62177

CVE-2025-62177 SQL Injection in Wegia
📅 PUBLISHED: 2025-10-13 21:09 UTC 🔄 UPDATED: 2026-10-09 10:28 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.53%
👁️
0.53% probability
13.2× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Country: Brazil License: Open Source
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 8.8
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
8.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-62177 is a critical SQL Injection vulnerability identified in WeGIA, an open-source Web Manager for Institutions primarily used by Portuguese-speaking users. The flaw resides in the /html/funcionario/dependente_listar.php endpoint, specifically within the id_funcionario parameter. An unauthenticated attacker can exploit this vulnerability to execute arbitrary SQL commands against the backend database, leading to full compromise of confidentiality, integrity, and availability. The vulnerability affects all versions prior to 3.5.1. No public proof-of-concept (PoC) code or exploit has been released at this time, but the risk remains high due to the ease of exploitation and the potential for data exfiltration or ransomware deployment.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

WeGIA is a PHP-based web application. The vulnerability is not in a package manager (NPM, PyPI, Go, Ruby) but in the application's own source code. The supply chain risk is limited to the application's direct deployment. Organizations using WeGIA should treat this as a critical application-level vulnerability and prioritize patching.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Base Score: 9.8 (Critical)
  • Attack Vector: Network (AV:N) – Exploitable remotely.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – The vulnerable component and the database are the same.
  • Confidentiality Impact: High (C:H) – Full database read access.
  • Integrity Impact: High (I:H) – Ability to modify or delete data.
  • Availability Impact: High (A:H) – Potential for denial of service or database destruction.

Threat Level: Critical. The combination of remote exploitability, no authentication requirement, and high impact makes this a top-priority vulnerability for any organization running WeGIA.

Deep Dive & Mechanics

The vulnerability is a classic SQL injection in the id_funcionario parameter of the dependente_listar.php script. The application likely constructs a SQL query by directly concatenating user input without proper sanitization or parameterized queries.

Vulnerable Code Flow:

  1. The script receives an HTTP GET or POST request with the id_funcionario parameter.
  2. The value is directly embedded into a SQL query, e.g., SELECT * FROM dependentes WHERE id_funcionario = $_GET['id_funcionario'].
  3. An attacker can inject SQL syntax, such as ' OR '1'='1, to bypass intended logic or use UNION-based attacks to extract data from other tables.

Attack Scenario:

  • An attacker sends a request to /html/funcionario/dependente_listar.php?id_funcionario=1 UNION SELECT username, password, NULL, NULL FROM users.
  • The database executes the malicious query, returning user credentials in the application's response.
  • The attacker can then escalate privileges, pivot to other systems, or exfiltrate sensitive institutional data.

Vulnerable vs. Patched Code

Vulnerable Code (Pre-3.5.1):

// /html/funcionario/dependente_listar.php
$id_funcionario = $_GET['id_funcionario'];
$query = "SELECT * FROM dependentes WHERE id_funcionario = $id_funcionario";
$result = mysqli_query($conn, $query);

Patched Code (3.5.1):

// /html/funcionario/dependente_listar.php
$id_funcionario = intval($_GET['id_funcionario']);
$stmt = $conn->prepare("SELECT * FROM dependentes WHERE id_funcionario = ?");
$stmt->bind_param("i", $id_funcionario);
$stmt->execute();
$result = $stmt->get_result();

The patch uses intval() to cast the input to an integer and implements a prepared statement with parameterized queries, completely preventing SQL injection.

Exploitation & Lab Setup

Red Team (Offensive)

Lab Environment:

  • WeGIA version 3.5.0 (vulnerable) running on a local LAMP stack.
  • Database: MySQL/MariaDB with sample data.

Exploitation Steps:

  1. Reconnaissance: Identify the vulnerable endpoint by scanning for /html/funcionario/dependente_listar.php.
  2. Manual Injection: Use a web browser or tool like curl:
    curl "http://target.com/html/funcionario/dependente_listar.php?id_funcionario=1 UNION SELECT 1,2,3,4-- -"
    
  3. Automated Exploitation: Use sqlmap for full database enumeration:
    sqlmap -u "http://target.com/html/funcionario/dependente_listar.php?id_funcionario=1" --batch --dbs
    
  4. Data Exfiltration: Extract user credentials, institutional data, or other sensitive information.

No public exploit code is available at this time.

Blue Team (Defensive)

Detection & Response:

  • Web Application Firewall (WAF): Deploy rules to block requests containing SQL keywords (UNION, SELECT, OR) in the id_funcionario parameter.
  • Input Validation: Ensure all user inputs are validated and sanitized at the application layer.
  • Database Monitoring: Monitor for anomalous queries, especially those with UNION or OR clauses.
  • Log Analysis: Review web server logs for requests to /html/funcionario/dependente_listar.php with unusual parameter values.

Honeypot Strategy:

  • Deploy a decoy WeGIA instance to capture attacker behavior and gather IOCs.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests to /html/funcionario/dependente_listar.php with id_funcionario containing SQL keywords (e.g., UNION, SELECT, OR, --).
    • Unusual database error messages in HTTP responses (e.g., "You have an error in your SQL syntax").
  • File IOCs:
    • Modified or new files in the WeGIA installation directory (e.g., webshells).
  • Database IOCs:
    • Unexpected rows in dependentes table or other tables.
    • New database users or privileges.
  • Behavioral IOCs:
    • Unusual outbound database connections from the web server.
    • Large data transfers from the database server.

Detection Engineering

YARA Rule

rule CVE_2025_62177_WeGIA_SQLi {
    meta:
        description = "Detects SQL injection attempts targeting WeGIA CVE-2025-62177"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-62177"
    strings:
        $s1 = "id_funcionario" nocase
        $s2 = "UNION" nocase
        $s3 = "SELECT" nocase
        $s4 = "OR" nocase
        $s5 = "dependente_listar.php" nocase
    condition:
        all of ($s1, $s5) and any of ($s2, $s3, $s4)
}

Sigma Rule

title: WeGIA SQL Injection Attempt (CVE-2025-62177)
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects SQL injection attempts against WeGIA's dependente_listar.php endpoint
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-uri-query|contains: 
            - "id_funcionario="
            - "UNION"
            - "SELECT"
            - "OR"
            - "1=1"
    condition: selection
falsepositives:
    - Legitimate use of the word "OR" in a parameter (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2025-62177 WeGIA SQL Injection Attempt";
    flow:to_server,established;
    content:"/html/funcionario/dependente_listar.php"; http_uri;
    content:"id_funcionario"; http_uri;
    pcre:"/(UNION|SELECT|OR|1=1)/i";
    classtype:web-application-attack;
    sid:1000001;
    rev:1;
    reference:cve,2025-62177;
)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade WeGIA to version 3.5.1 or later immediately.
  2. Apply Virtual Patching: If immediate upgrade is not possible, deploy a WAF rule to block SQL injection patterns in the id_funcionario parameter.
  3. Restrict Network Access: Limit access to the WeGIA web interface to trusted IPs only.

Long-Term Measures:

  • Code Review: Conduct a security audit of all PHP scripts for similar injection vulnerabilities.
  • Secure Coding Practices: Implement parameterized queries and input validation across the entire application.
  • Regular Updates: Subscribe to WeGIA security advisories and apply patches promptly.
  • Database Hardening: Use least-privilege database accounts and enable query logging.

Valters IT – Your trusted partner in DevSecOps and Cyber Threat Intelligence.

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-62177/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.