[pentest2] Unbounded title/language fields accepted and stored (50 KB title, arbitrary language strings) #86

Closed
opened 2026-09-09 15:40:46 +00:00 by poslop · 2 comments
Owner

Severity: Info/Low
Target: palette-dev v0.2.1

title and language are stored without length/format validation: a 5000-character title and a language of "<img src=x onerror=alert(1)>" are both accepted and echoed back in /api/public and paste pages. Output escaping is correct everywhere I checked (server-side &lt;...&gt;, client-side esc() in table.js), so this is data pollution / listing bloat, not XSS — but an attacker can make the public listing heavier (titles of arbitrary length appear in every feed response). Recommend validating language against the supported set and capping title length server-side (client cap only via the input).

**Severity:** Info/Low **Target:** palette-dev v0.2.1 `title` and `language` are stored without length/format validation: a 5000-character title and a `language` of `"<img src=x onerror=alert(1)>"` are both accepted and echoed back in `/api/public` and paste pages. Output escaping is correct everywhere I checked (server-side `&lt;...&gt;`, client-side `esc()` in table.js), so this is data pollution / listing bloat, not XSS — but an attacker can make the public listing heavier (titles of arbitrary length appear in every feed response). Recommend validating `language` against the supported set and capping title length server-side (client cap only via the input).
poslop added spent time 25 seconds 2026-09-09 15:58:54 +00:00
Author
Owner

Fixed in PR #91: title truncated to 200 chars, language validated against ^[a-zA-Z0-9+#-]{1,40}$ with a clear 400 otherwise. Regression tests included.

Fixed in PR #91: title truncated to 200 chars, language validated against ^[a-zA-Z0-9+#-]{1,40}$ with a clear 400 otherwise. Regression tests included.
Author
Owner

Fixed and merged to main (v0.2.2 pending release).

Fixed and merged to main (v0.2.2 pending release).
Sign in to join this conversation.
1 Participants
Notifications
Total Time Spent: 25 seconds
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: poslop/palette#86