CVE-2026-49136

Banana Slides 0.4.0 Path Traversal via generate_image() in ai_service.py

Published Jun 1, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
Banana Slides through 0.4.0, patched in commit e8bc490, contains a path traversal vulnerability in the generate_image() function within the AI service backend that allows unauthenticated attackers to read arbitrary image-format files outside the intended uploads directory by exploiting an incomplete path prefix check using os.path.startswith() without a trailing separator. Attackers can supply crafted markdown image references in user-controlled page descriptions that resolve to sibling directories whose names share the uploads folder prefix, bypassing the directory confinement check and causing the application to read files from unintended locations via PIL Image.open().

Analysis

AI-generated

Technical impact

A path traversal flaw in the generate_image() function of Banana Slides 0.4.0 lets attackers craft markdown image references that cause the application to read arbitrary image-format files outside the intended uploads directory. The flaw arises from an incomplete prefix check using os.path.startswith() without a trailing separator, enabling directory confinement bypass. As a result, unauthenticated attackers can read any accessible file that resides in a sibling directory whose name shares the uploads folder prefix, potentially exposing sensitive data.

Affected Systems

The vulnerability affects Anionex Banana Slides version 0.4.0. The patch is implemented in commit e8bc490, which is included in later releases.

Risk and Exploitability

The CVSS score of 8.7 classifies this exploit as high severity. No EPSS data is available, and the vulnerability is not listed in the CISA KEV catalog. Attackers only need to supply a crafted image reference within an unauthenticated user‑controlled page description; the backend then opens the target file with PIL Image.open(), making the attack straightforward and requiring no additional privileges.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Banana Slides to the patched version that includes commit e8bc490 or later
  • Enforce strict path validation by ensuring the uploads directory name ends with a separator before checking with startswith
  • Restrict file reading to allowed image types and directories, using a whitelist approach and sanitizing markdown input

Generated by OpenCVE AI on June 1, 2026 at 21:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Anionex
Anionex banana-slides
Vendors & Products Anionex
Anionex banana-slides
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Banana Slides through 0.4.0, patched in commit e8bc490, contains a path traversal vulnerability in the generate_image() function within the AI service backend that allows unauthenticated attackers to read arbitrary image-format files outside the intended uploads directory by exploiting an incomplete path prefix check using os.path.startswith() without a trailing separator. Attackers can supply crafted markdown image references in user-controlled page descriptions that resolve to sibling directories whose names share the uploads folder prefix, bypassing the directory confinement check and causing the application to read files from unintended locations via PIL Image.open().
Title Banana Slides 0.4.0 Path Traversal via generate_image() in ai_service.py
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

cvssV4_0

{'score': 8.7, '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'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 8, 2026, 2:04 PM
Reserved
May 27, 2026, 5:40 PM
Status
Deferred
Published
Jun 1, 2026, 9:16 PM
Modified
Jul 22, 2026, 8:10 AM