/

CVE-2026-102615

Severity:

HIGH RISK

(7.6)

Stored Cross-Site Scripting (CWE-79) in HeyForm Uploads

CVE-2026-102615

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Same-origin script execution and potential access to account-authorized data

Severity:

HIGH RISK

(7.6)

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

HeyForm's upload and static-file serving behavior can allow active HTML to be stored and served from the application's origin. If a victim opens the returned file URL, its script may act with that victim's session and access data available to their account.

HeyForm's upload and static-file serving behavior can allow active HTML to be stored and served from the application's origin. If a victim opens the returned file URL, its script may act with that victim's session and access data available to their account.

Affected context

The issue occurs in HeyForm's /api/upload and static/upload paths. The upload handler relies on a client-controlled multipart MIME type while retaining an HTML filename, and the static serving configuration delivers the file as text/html without a content security policy. The advisory also describes uploads associated with active public forms, but does not fully verify that unauthenticated path end to end.

The issue occurs in HeyForm's /api/upload and static/upload paths. The upload handler relies on a client-controlled multipart MIME type while retaining an HTML filename, and the static serving configuration delivers the file as text/html without a content security policy. The advisory also describes uploads associated with active public forms, but does not fully verify that unauthenticated path end to end.

Exploit preconditions

  • Attack surface: The file upload endpoint and the resulting static file URL
  • Required access: An ordinary user can upload a file; an unauthenticated public-form route may also be possible, but was not fully verified
  • Trigger point: A victim opens the uploaded file's URL in a browser
  • Why exploitation is possible: The upload accepts a client-controlled MIME type, and the resulting HTML is served from the HeyForm origin without a content security policy
  • Attack surface: The file upload endpoint and the resulting static file URL
  • Required access: An ordinary user can upload a file; an unauthenticated public-form route may also be possible, but was not fully verified
  • Trigger point: A victim opens the uploaded file's URL in a browser
  • Why exploitation is possible: The upload accepts a client-controlled MIME type, and the resulting HTML is served from the HeyForm origin without a content security policy

Why this happens

The application relies on client-provided file metadata when accepting uploads and serves retained HTML filenames as active HTML from its own origin. This creates a stored cross-site scripting condition mapped to CWE-79: Improper Neutralization of Input During Web Page Generation. The unsafe pattern is allowing attacker-controlled content to become executable browser content in a trusted origin.

The application relies on client-provided file metadata when accepting uploads and serves retained HTML filenames as active HTML from its own origin. This creates a stored cross-site scripting condition mapped to CWE-79: Improper Neutralization of Input During Web Page Generation. The unsafe pattern is allowing attacker-controlled content to become executable browser content in a trusted origin.

Potential impact

  • Same-origin script could act with the permissions of a victim who opens the file
  • An attacker could potentially read or modify data accessible to that victim through /graphql
  • Victim account information or actions could be exposed or abused within the account's authorization scope
  • Same-origin script could act with the permissions of a victim who opens the file
  • An attacker could potentially read or modify data accessible to that victim through /graphql
  • Victim account information or actions could be exposed or abused within the account's authorization scope

General mitigation guidance

Defensive patterns include treating uploaded files as untrusted regardless of their declared MIME type, validating content and file types on the server, and avoiding serving user-controlled HTML as active content on the application origin. Consider storing uploads outside the application origin or serving them as downloads with safe content-disposition and content-type policies. Apply an appropriate content security policy as defense in depth, and ensure upload and form permissions follow least privilege.

Defensive patterns include treating uploaded files as untrusted regardless of their declared MIME type, validating content and file types on the server, and avoiding serving user-controlled HTML as active content on the application origin. Consider storing uploads outside the application origin or serving them as downloads with safe content-disposition and content-type policies. Apply an appropriate content security policy as defense in depth, and ensure upload and form permissions follow least privilege.

How teams detect issues like this

  • Use static analysis and code review to identify upload decisions based on client-controlled MIME types or filenames.
  • Review file-serving routes for user-controlled content served as active HTML on the application origin, especially where CSP is absent or disabled.
  • Test upload and public-form authorization boundaries, and verify that uploaded content is delivered with safe browser-handling headers.
  • Enforce policies requiring server-side file validation and isolation of untrusted uploads; automated code review tools may help surface risky patterns.
  • Use static analysis and code review to identify upload decisions based on client-controlled MIME types or filenames.
  • Review file-serving routes for user-controlled content served as active HTML on the application origin, especially where CSP is absent or disabled.
  • Test upload and public-form authorization boundaries, and verify that uploaded content is delivered with safe browser-handling headers.
  • Enforce policies requiring server-side file validation and isolation of untrusted uploads; automated code review tools may help surface risky patterns.

Sources

SourceLink
github.comgithub.com/heyform/heyform/commit/849f7101d4370b29e716b2d7ee14a86c2f598f3a
github.comgithub.com/heyform/heyform/releases/tag/v3.0.1
github.comgithub.com/heyform/heyform/security/advisories/GHSA-pxw5-pjrc-j758

Frequently asked

questions

The issue involves a web-accessible upload and file-serving flow. A victim generally needs to open the resulting URL for the stored script to run in their browser.

An ordinary user can upload files. An upload path associated with an active public form is described, but its unauthenticated exploitability was not fully verified.

Do not serve untrusted uploads as active HTML from the application origin. Validate files server-side and use safe content-delivery behavior or an isolated origin.

Treat filenames and MIME types as untrusted, enforce server-side upload policies, and review file-serving headers and origin boundaries.

The issue involves a web-accessible upload and file-serving flow. A victim generally needs to open the resulting URL for the stored script to run in their browser.

An ordinary user can upload files. An upload path associated with an active public form is described, but its unauthenticated exploitability was not fully verified.

Do not serve untrusted uploads as active HTML from the application origin. Validate files server-side and use safe content-delivery behavior or an isolated origin.

Treat filenames and MIME types as untrusted, enforce server-side upload policies, and review file-serving headers and origin boundaries.

Find out what's already
exploitable in your codebase.