Security
The normative security document of the Really Small Web is RSW-0011 โ Security and Permissions (revision 0.01, experimental proposal, mandatory for the MVP). This page summarizes its threat model for orientation; the specification is authoritative.
Principles
- The PNG is passive; the risk arises in the reader that interprets untrusted content.
- Received content is always untrusted, even when signed. Authenticity is not trust.
- The MVP does not execute third-party code; cartridge JavaScript is disabled (RSW-0012 is post-MVP).
- RSW-0001/0002/0003 validation happens before any rendering.
- The reader's privileged interface is isolated from rendered content (sandbox iframe, restrictive CSP).
- No external connection is made silently; offline mode blocks RSW-generated traffic.
- Unsigned cartridges are only accepted as local files with a warning.
Threat summary (from architecture v0.02, section 14)
| Threat | Required or proposed protection |
|---|---|
| Malformed PNG, invalid CRC | Strict parser, limits, safe rejection. |
| Excessive decompression | Count real bytes and limit resources. |
| Path traversal | Validated paths; nothing outside the root. |
| Symlinks and duplicates | Reject special entries and collisions. |
| Tampering | Verifiable hashes and signatures. |
| Active HTML, XSS, scripts | Sanitization, sandbox, CSP, separation. |
| External tracking | Block remote subresources by default. |
| SSRF and redirects | Destination restrictions and explicit policy. |
| DNS rebinding | Validate Host, origin, and network destinations. |
| CSRF on the local API | Session token, Origin, safe methods. |
| Replay and downgrade | Sequence verification and known hash. |
| Version conflicts | Warning and deterministic policy. |
| Key theft | Separate storage, restricted access. |
| Resource abuse | Time, memory, disk, and rate limits. |
No reader should promise that every malicious file will be detected. Before any public software release, the architecture document requires independent security review, fuzzing, negative file tests, and rendered-content escape tests. None of these has been performed yet, because the implementation does not exist.
Cryptographic test vectors on this site use a public test key explicitly marked as not belonging to Pablo Murad and not for production use.