/

CVE-2026-108101

Severity:

HIGH RISK

(7.5)

Unrestricted File Upload (CWE-434) in HortusFox Web

CVE-2026-108101

Deferred

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Stored Cross-Site Scripting and Potential Remote Code Execution

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

HortusFox through version 6.3 permits authenticated users to upload files with client-controlled extensions through the plant attachment feature. Depending on server configuration, uploaded HTML or SVG files may enable stored cross-site scripting, while PHP files could enable server-side code execution when upload-directory restrictions are not enforced.

HortusFox through version 6.3 permits authenticated users to upload files with client-controlled extensions through the plant attachment feature. Depending on server configuration, uploaded HTML or SVG files may enable stored cross-site scripting, while PHP files could enable server-side code execution when upload-directory restrictions are not enforced.

Affected context

The vulnerability occurs in the HortusFox web application's plant attachment workflow, including PlantAttachmentModel and the /plants/attachments/add endpoint. It becomes risky when authenticated users can upload files whose extensions and content are insufficiently restricted, and when the public public/attachments/ directory permits active content to be interpreted or executed by the web server.

The vulnerability occurs in the HortusFox web application's plant attachment workflow, including PlantAttachmentModel and the /plants/attachments/add endpoint. It becomes risky when authenticated users can upload files whose extensions and content are insufficiently restricted, and when the public public/attachments/ directory permits active content to be interpreted or executed by the web server.

Exploit preconditions

  • Attack surface: The authenticated plant attachment upload functionality
  • Required access: A valid account with permission to add plant attachments
  • Trigger point: Processing and storing an uploaded file through /plants/attachments/add
  • Why exploitation is possible: Client-supplied file extensions are accepted without sufficiently restrictive type validation, allowing active HTML, SVG, or server-side script content to reach a publicly accessible directory
  • Deployment dependency: Server-side code execution generally depends on the upload directory allowing PHP interpretation or lacking effective .htaccess enforcement
  • Attack surface: The authenticated plant attachment upload functionality
  • Required access: A valid account with permission to add plant attachments
  • Trigger point: Processing and storing an uploaded file through /plants/attachments/add
  • Why exploitation is possible: Client-supplied file extensions are accepted without sufficiently restrictive type validation, allowing active HTML, SVG, or server-side script content to reach a publicly accessible directory
  • Deployment dependency: Server-side code execution generally depends on the upload directory allowing PHP interpretation or lacking effective .htaccess enforcement

Why this happens

The underlying issue is an unrestricted file upload pattern mapped to CWE-434: Unrestricted Upload of File with Dangerous Type. The application relies too heavily on client-controlled filename extensions and does not consistently constrain uploaded content to a safe, non-executable attachment format before storing it in a public directory. This creates a path where browser-interpretable files can be served to users and server-interpretable files may be executed when web-server controls are insufficient.

The underlying issue is an unrestricted file upload pattern mapped to CWE-434: Unrestricted Upload of File with Dangerous Type. The application relies too heavily on client-controlled filename extensions and does not consistently constrain uploaded content to a safe, non-executable attachment format before storing it in a public directory. This creates a path where browser-interpretable files can be served to users and server-interpretable files may be executed when web-server controls are insufficient.

Potential impact

  • Uploaded HTML or SVG content may execute script in the context of the HortusFox application
  • An attacker could steal session-related data or perform actions as another user through stored cross-site scripting
  • PHP files may enable arbitrary server-side code execution where execution controls are not enforced
  • Application data, credentials, or hosted content could be modified or exposed
  • The application host could be used for further compromise or lateral movement
  • Uploaded HTML or SVG content may execute script in the context of the HortusFox application
  • An attacker could steal session-related data or perform actions as another user through stored cross-site scripting
  • PHP files may enable arbitrary server-side code execution where execution controls are not enforced
  • Application data, credentials, or hosted content could be modified or exposed
  • The application host could be used for further compromise or lateral movement

General mitigation guidance

Mitigation generally focuses on treating uploaded files as untrusted data and ensuring they cannot become executable content.

Common defensive patterns include:

  • Allowing only a narrow, business-necessary set of attachment types
  • Validating file content and detected media type rather than trusting extensions or client metadata
  • Generating server-side filenames and removing user-controlled path components
  • Storing uploads outside the web root where practical, or serving them through a non-executable download handler
  • Applying explicit web-server policies that disable script execution and active content handling in upload directories
  • Using safe response headers and content-disposition behavior when serving user-uploaded files
  • Enforcing size, rate, and storage limits and scanning files where appropriate
  • Running the application with least privilege so compromised upload handling has limited access

Mitigation generally focuses on treating uploaded files as untrusted data and ensuring they cannot become executable content.

Common defensive patterns include:

  • Allowing only a narrow, business-necessary set of attachment types
  • Validating file content and detected media type rather than trusting extensions or client metadata
  • Generating server-side filenames and removing user-controlled path components
  • Storing uploads outside the web root where practical, or serving them through a non-executable download handler
  • Applying explicit web-server policies that disable script execution and active content handling in upload directories
  • Using safe response headers and content-disposition behavior when serving user-uploaded files
  • Enforcing size, rate, and storage limits and scanning files where appropriate
  • Running the application with least privilege so compromised upload handling has limited access

How teams detect issues like this

Detection approaches can include:

  • Static analysis rules for file upload handlers that persist client-controlled names or extensions
  • Code review checks for missing allowlists, MIME/content validation, canonicalization, or upload-directory isolation
  • Runtime monitoring for unexpected HTML, SVG, PHP, or other active-content files under attachment paths
  • Web-server policy checks confirming that public upload directories cannot execute scripts
  • Application logging and alerting for unusual upload volume, file types, or access patterns
  • Automated security review tools that identify dangerous upload flows and missing authorization or content controls

Detection approaches can include:

  • Static analysis rules for file upload handlers that persist client-controlled names or extensions
  • Code review checks for missing allowlists, MIME/content validation, canonicalization, or upload-directory isolation
  • Runtime monitoring for unexpected HTML, SVG, PHP, or other active-content files under attachment paths
  • Web-server policy checks confirming that public upload directories cannot execute scripts
  • Application logging and alerting for unusual upload volume, file types, or access patterns
  • Automated security review tools that identify dangerous upload flows and missing authorization or content controls

Sources

SourceLink
github.comgithub.com/danielbrendel/hortusfox-web
github.comgithub.com/danielbrendel/hortusfox-web/blob/v6.3/app/models/PlantAttachmentModel.php#L28-L31
github.comgithub.com/danielbrendel/hortusfox-web/blob/v6.3/app/resources/js/app.js#L466
github.comgithub.com/danielbrendel/hortusfox-web/security/advisories/GHSA-8phf-v3xj-8jjg
hackmd.iohackmd.io/@leediay/stored-xss-hortusfox-via-plant-attachment
vulncheck.comvulncheck.com/advisories/hortusfox-through-6.3-unrestricted-file-upload-via-plant-attachments

Frequently asked

questions

It can be remotely exploitable through the web application when an attacker has authenticated access to the plant attachment upload function and the application is reachable over the network.

A valid authenticated account with permission to upload plant attachments is generally required. The resulting impact also depends on how the web server handles files in the public attachment directory.

Treat uploads as untrusted data, enforce a strict content allowlist, generate server-side filenames, and store or serve files in a location where active content and server-side execution are disabled.

Combine upload validation with authorization checks, isolated storage, non-executable server policies, safe response headers, resource limits, and continuous monitoring of uploaded content.

It can be remotely exploitable through the web application when an attacker has authenticated access to the plant attachment upload function and the application is reachable over the network.

A valid authenticated account with permission to upload plant attachments is generally required. The resulting impact also depends on how the web server handles files in the public attachment directory.

Treat uploads as untrusted data, enforce a strict content allowlist, generate server-side filenames, and store or serve files in a location where active content and server-side execution are disabled.

Combine upload validation with authorization checks, isolated storage, non-executable server policies, safe response headers, resource limits, and continuous monitoring of uploaded content.

Find out what's already
exploitable in your codebase.