Summary
Frappe Framework has an arbitrary file read vulnerability in how attributes in outgoing email HTML are handled. If an attacker can supply outgoing email content, they may be able to reference local file paths in attribute values and expose sensitive server files.
Affected context
The issue occurs in Frappe Framework's handling of attributes in outgoing email HTML. Deployments may be at risk when attacker-controlled email content is processed in a way that allows attribute values referencing local file paths to be read or included.
Exploit preconditions
- Attack surface: Handling or processing outgoing email HTML
- Required access: Ability to supply or influence outgoing email content; the specific access controls depend on the deployment
- Trigger point: Processing an outgoing email containing an attribute value that references a local file path
- Why exploitation is possible: Attribute values are handled without sufficiently restricting access to local filesystem paths
Why this happens
The underlying issue is insufficient control over file path values supplied through outgoing email HTML attributes. This maps to CWE-73: External Control of File Name or Path, where externally influenced input can direct an application to access a file outside the intended scope.
Potential impact
- Sensitive server files may be exposed
- Credentials, configuration data, or other secrets in readable files could be disclosed
- Disclosed information could support further compromise of the application or its environment
General mitigation guidance
Defensive patterns focus on reducing trust in email content and limiting filesystem access:
- Avoid resolving local file paths from externally influenced HTML attributes
- Use strict allowlists for permitted attribute values and resource types
- Prefer safe, explicit mechanisms for embedding or referencing email resources
- Run application processes with least-privilege filesystem permissions
- Keep sensitive files outside paths readable by the email-processing service where practical
How teams detect issues like this
- Review code that parses or transforms outgoing email HTML for filesystem access influenced by attribute values
- Use static analysis to flag file reads whose paths derive from user-controlled or otherwise untrusted content
- Inspect logs and email-processing telemetry for unusual local file references or unexpected file access
- Enforce code-review and security policies requiring validation and allowlisting of email HTML attributes

