mirror of
https://github.com/wekan/wekan.git
synced 2026-11-20 15:45:01 -05:00
setAvatarUrl refuses javascript:, file:, data:text/html and every scheme but
http(s), data:image and local paths, but the Users allow rule permits every
profile.* field, so Users.update({$set: {'profile.avatarUrl': ...}}) from the
browser console stored what the method refuses. Not exploitable as reported:
the URL is rendered only as an <img src>, and the server fetches it only
through fetchSafe (http/https). The rule is now models/lib/avatarUrlScheme.js,
used by both avatar methods and by a Users deny rule, which logs the refused
write to Admin Panel / Problems as file.avatar-url. No WeKan client code
writes the field directly, which the test checks.
Verified while checking meifukun's GHSA-g98f-44gc-hqcc, GHSA-x6fh-wrr5-3426,
GHSA-28hr-j65r-grj2, GHSA-mrhx-8xm7-chrq and GHSA-83qj-w8mp-w4qf against the
current code: all five were already fixed (tests/securityMeifukun.test.cjs).
Thanks to meifukun and xet7 !