Security Audit Report: Font Parsing, ReDoS, and Prototype Pollution Findings #725
artahir-dev
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
I recently conducted a comprehensive security audit of Vercel Satori (
satori <= 0.10.13) focusing on critical areas such as font handling, regular expression safety (ReDoS), and prototype pollution.This issue serves to document the negative findings (tests confirmed as SAFE) and the methodology used, to help maintainers track validated security boundaries.
Audit Scope & Methodology
1. Font Parsing (
src/font.ts)Objective: Verify robustness against malformed font files and resource exhaustion attacks (DoS).
Library:
@shuding/opentype.js(v1.4.0-beta.0)Tests Performed:
test-font-fuzzing.ts): Tested with randomized headers, truncated files, and invalid offset tables.test-font-dos.ts): Tested with huge buffer allocations (1GB+) to check for OOM handling.Result: SAFE
2. Regular Expression Denial of Service (ReDoS)
Objective: Identify regex patterns vulnerable to catastrophic backtracking.
Components Audited:
src/handler/expand.ts(CSS Property Expansion)src/parser/shape.ts(Shape Function Parsing)src/text/processor.ts(Text Transformation)Tests Performed (
test-redos.ts):Result: SAFE
O(n)).3. Prototype Pollution
Objective: Verify if
Object.assignor deep merge operations allow modifyingObject.prototype.Attack Vector: Injection of
__proto__,constructor, orprototypevia props or style objects.Tests Performed (
test-prototype-pollution.ts):Result: SAFE
Reproduction Scripts
I have included the test scripts used for verification. You can run them to reproduce these results:
Conclusion
The core components for font parsing, text processing, and object handling appear robust against common attack vectors. No further action is required for these specific areas.
All reactions