Security: mailing-list address actions are GET links without CSRF token, and mailing progress needs no login
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 54/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- php
- Domain
- authentication, backend, security
Research direction
Start in system/datatypes/mailinglist.php at the dispatch around lines 118–124 and inspect addressesView(), the three address actions, and mailingProgressAction() around line 1241. Compare the action links and handlers with the command flow that uses makeAction() and the isUser() check. The issue is done when the address actions require a CSRF-protected POST and mailing progress requires login.
Written by the indexing model from the issue text.
Description
Summary. The address list of a mailing list offers the administrator three actions as plain links with the e-mail address in the query string: …/remind?email=… (sends a confirmation mail again), …/delete?email=… (removes a pending address) and …/unsubscribe_by_admin?email=… (ends a subscription). They are views, handled on GET, without the CSRF token that Hypha's commands carry. A page elsewhere that makes a logged-in administrator open such a link (a top-level navigation is enough; session cookies without SameSite=Strict are sent along) removes or unsubscribes an address or sends a reminder mail on the administrator's behalf.
Separately, the progress endpoint of a mailing (POST …/mails/<id> with command=progress) has no login check: anyone who knows or guesses a mailing id gets the status of that mailing, also of a draft, and the number of confirmed subscribers.
Severity: Low. It needs a logged-in administrator and knowledge of the address; it changes subscriptions but exposes no personal data. The subscriber count is minor.
Affected code (main, d97ab7b), system/datatypes/mailinglist.php: the dispatch at lines 118-122, remindAction(), deleteAddressAction(), unsubscribeByAdminAction(); the links built in addressesView(); mailingProgressAction() (line 1241).
Suggested fix. Turn the three actions into commands posted with the form's CSRF token (makeAction(…, 'remind', $email), handled as [PATH_ADDRESSES, 'remind'] etc.), and add the isUser() check to mailingProgressAction(). Related: #420 (a failed CSRF check does not stop datatype commands).
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 9
- Avg merge
- 18h 49m
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Impact: Medium Level: Easy Type: Bug Value: Users
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Impact: Low Level: Easy Type: Bug Value: Coders
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
PlanBCode/hypha#586 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
parse-community/parse-server#10871 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4270 ·
-
502 on Node 26: ERR_INVALID_ARG_VALUE: Setting the TLS ServerName to an IP address is not permittedOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
c1overzz/dsh-bili-scroll#189 ·
Maintainers usually reply within 1 day