Skip to content

fix: stored XSS in todo content rendering (CWE-79) - #230

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787665376-todo-content-stored-xss
Open

fix: stored XSS in todo content rendering (CWE-79)#230
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787665376-todo-content-stored-xss

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 25, 2026

Copy link
Copy Markdown

Summary

Stored todo content was rendered as raw HTML on the index page:

- <%- marked(new String(todo.content)) %>
+ <%= todo.content %>

marked@0.3.5's sanitize: true is not a security boundary (multiple known bypasses, e.g. [x](javascript&#58...) — see exploits/marked-exploit.sh), so any user-supplied todo could inject script that executed for every viewer. Escaping the value with EJS <%= removes the raw-HTML sink entirely, matching how views/edit.ejs already renders the same field.

app.js drops the now-unused marked require and the app.locals.marked wiring so the unsafe helper isn't reachable from any other template.

Devin-Org: engineering


Devin Review

Status Commit
⚪ Not started

Run Devin Review

Devin Review (Staging)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants