[pentest2] Unbounded title/language fields accepted and stored (50 KB title, arbitrary language strings) #86
Notifications
Total Time Spent: 25 seconds
poslop
25 seconds
No due date set.
Dependencies
No dependencies set.
Reference: poslop/palette#86
Reference in New Issue
Block a user
Severity: Info/Low
Target: palette-dev v0.2.1
titleandlanguageare stored without length/format validation: a 5000-character title and alanguageof"<img src=x onerror=alert(1)>"are both accepted and echoed back in/api/publicand paste pages. Output escaping is correct everywhere I checked (server-side<...>, client-sideesc()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 validatinglanguageagainst the supported set and capping title length server-side (client cap only via the input).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 and merged to main (v0.2.2 pending release).