safe-formdata is a boundary-focused FormData parser designed with security as a core principle.
This document defines:
- How to report security issues responsibly
- What is considered in scope vs out of scope
- The security guarantees and assumptions of this library
- How security-related issues are evaluated and handled
This policy serves as the authoritative reference for security-related decisions, including issue triage and closure.
Only the latest release receives security updates.
Security fixes are not backported. Users must upgrade to the latest version to receive security patches.
safe-formdata distinguishes clearly between private vulnerability disclosure and public security discussion.
Use GitHub Security Advisories for:
- Reproducible vulnerabilities
- Exploit techniques or payloads
- Issues that could be actively abused
- Any report containing proof-of-concept code
👉 Report privately here:
https://github.com/roottool/safe-formdata/security/advisories/new
Public issues are appropriate only for:
- Design-level security questions
- Non-sensitive security concerns
- Documentation gaps or unclear guarantees
- Boundary assumptions that need clarification
Do not include exploit code or detailed attack vectors in public issues.
If you are unsure, report privately first.
To report a security issue responsibly:
- Preferred: Open a GitHub Security Advisory (private)
- Alternative: Open a public issue with a high-level, non-sensitive description
Public issues that include sensitive details may be closed and redirected to private reporting.
safe-formdata establishes a strict trust boundary between untrusted FormData input and application logic.
All security issues are evaluated relative to this boundary.
The following are considered security vulnerabilities in safe-formdata:
- Prototype pollution
- Bypassing forbidden key detection (
__proto__,constructor,prototype)
- Bypassing forbidden key detection (
- Boundary violations
- Incorrect handling of duplicate or invalid keys that allows ambiguous or unsafe state
- Unsafe parsing behavior
- Untrusted FormData crossing the boundary without explicit issue reporting
- Data integrity violations
- Failure to guarantee that parsed
datais created viaObject.create(null)
- Failure to guarantee that parsed
These issues directly compromise the safety of the FormData boundary.
The following are not considered security vulnerabilities:
- Application logic
- Value validation, business rules, authorization, or authentication
- Framework behavior
- Framework-specific request parsing or integration details
- Resource exhaustion
- Denial-of-service via large inputs or excessive keys
- API misuse
- Incorrect usage by consumers (e.g., ignoring
issues)
- Incorrect usage by consumers (e.g., ignoring
If an issue falls under these categories,
it will be closed without action, even if it has security implications
at the application level.
The following are common but incorrect security reports:
- Ignoring
issuesand usingdataanyway - Treating parsed values as trusted without validation
- Expecting schema validation, type guarantees, or coercion
- Assuming framework-style parsing or convenience behavior
These are application-level responsibilities, not library vulnerabilities.
safe-formdata provides the following security guarantees:
- Forbidden keys are always detected
__proto__,constructor, andprototypeare rejected
- No prototype chain
- Parsed
datais always created withObject.create(null)
- Parsed
- Explicit issue reporting
- All boundary violations are reported in
issues - No silent correction or inference
- All boundary violations are reported in
- Predictable behavior
- No structural inference
- No silent merging
- No implicit conversions
safe-formdata assumes:
- All input FormData is fully untrusted
- Consumers must check
issuesbefore usingdata - Validation and business logic are performed outside the boundary
Important: Violating these assumptions is not a library vulnerability.
Security reports are handled as follows:
- Review
- Issues are evaluated against the security scope defined above
- Response
- An initial response will be provided
- Fix
- In-scope vulnerabilities are prioritized and addressed
- Disclosure
- Fixes are released with security notes in the changelog
Security fixes may introduce breaking changes, including in v0.x releases, if required to strengthen the boundary.
Security takes priority over backward compatibility.
After a fix is released, vulnerability details may be disclosed publicly to help the community understand and verify the fix.
This security policy and all security-related contributions are covered by the same MIT License as the rest of the project.