제출 #1078365: https://github.com/jarun/ buku commit 062cf40bc90462aa1fae215ca1abd877804649c Cross-Site Request Forgery정보

제목https://github.com/jarun/ buku commit 062cf40bc90462aa1fae215ca1abd877804649c Cross-Site Request Forgery
설명CSRF on bukuserver bookmark reorder and swap endpoints Affected versions: confirmed on commit `062cf40bc90462aa1fae215ca1abd877804649c` (34 commits past tag `v5.1.1`, current `master`). ## Summary bukuserver's bookmark reorder (`POST /bookmark/reorder`) and swap (`POST /bookmark/swap`) view handlers perform their database mutation directly from `request.form` without ever validating a CSRF token, even though both are registered as plain form-POST endpoints reachable from a cross-origin HTML form. `flask_wtf.CSRFProtect` is never instantiated anywhere in the application. ## Details `bukuserver/views.py`: ```python @expose('/reorder', methods=['POST']) def refresh(self): filters = json.loads(request.form['filters']) order = bs_filters.BookmarkOrderFilter.value(self._filters, filters) self.bukudb.reorder(order) flash(_('Reordered bookmarks in DB'), 'success') return redirect(url_for('.index_view')) @expose('/swap', methods=['POST']) def swap(self): form = forms.SwapForm() self.bukudb.swap_recs(form.id1.data, form.id2.data) redirect_url = request.form.get('url', url_for('bookmark.index_view')) if redirect_url.startswith('//') or '://' in redirect_url: redirect_url = url_for('bookmark.index_view') return redirect(redirect_url) ``` Neither handler calls `form.validate()` or `form.validate_on_submit()`, which is where Flask-WTF's CSRF check runs. There is no `CSRFProtect(app)` registered anywhere under `bukuserver/`. `reorder` does not use a `FlaskForm` at all. Both endpoints accept a standard `application/x-www-form-urlencoded` POST, the shape a plain cross-origin HTML `<form>` submission produces without any preflight. ## Steps To Reproduce (available upon request) ## Impact A malicious web page can forge a bookmark reorder or position swap against any bukuserver instance a victim's browser can reach, using only a plain HTML form submission. Where bukuserver is reachable with no application authentication (the documented default), this requires no victim interaction with bukuserver itself beyond having their browser visit the attacker's page; where an operator has added a reverse-proxy Basic Auth in front of bukuserver, the forged request still succeeds as long as the victim's browser has that credential cached. The same missing-CSRF-check pattern extends to the fetch/refresh endpoints, meaning a forged cross-origin form submission can also trigger blind outbound SSRF requests and bulk refresh operations through a victim's browser.
원천⚠️ https://github.com/jarun/buku/issues/912
사용자
 carfeii (UID 97470)
제출2026. 11. 06. PM 06:12 (22 날 ago)
모더레이션2026. 11. 29. AM 03:36 (22 days later)
상태수락
VulDB 항목445150 [jarun buku 까지 5.1 bukuserver/views.py BookmarkModelView 교차 사이트 요청 위조]
포인트들20

Interested in the pricing of exploits?

See the underground prices here!