PolarLearn Forum Vote Count Manipulation (CVE-2026-25126)
by Joshua van Rijswijk (Jvr2022) · 2026-07-05
- Severity
- Medium
- CVE
- CVE-2026-25126
- Category
- web
- Affected product
- PolarLearn forum platform
- Affected versions
- Version prior to the fix referenced in GHSA-ghpx-5w2p-p3qp
- Disclosed
- 2026-07-05
- Patch status
- unpatched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-01 |
| Author / Researcher | Joshua van Rijswijk (Jvr2022) |
| CVE / Advisory | CVE-2026-25126 |
| Category | web |
| Severity | Medium |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | business-logic, vote-manipulation, input-validation, api-abuse, forum, nodejs, ghost-downvote |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | PolarLearn forum platform |
| Versions Affected | Version prior to the fix referenced in GHSA-ghpx-5w2p-p3qp |
| Language / Platform | Node.js 18+ (PoC), target is a web API |
| Authentication Required | Yes (valid authenticated session cookie) |
| Network Access Required | Yes |
Summary
CVE-2026-25126 is a business logic flaw in PolarLearn’s forum voting API. The POST /api/v1/forum/vote endpoint declares a TypeScript type for the direction field but never validates it at runtime, so the server accepts arbitrary string values instead of only "up", "down", or null. Downstream vote-handling logic treats any unexpected non-null value as an implicit downvote while still persisting it, and alternating an invalid value with a null “reset” lets an authenticated user repeatedly decrement a post’s score. The included PoC automates this cycle against a live target to demonstrate so-called “ghost downvotes.”
Vulnerability Details
Root Cause
The vote endpoint parses the JSON body and passes direction straight into VoteServer() without enforcing that it is one of the allowed literal values, allowing malformed input to be misinterpreted as a valid downvote action.
Attack Vector
- Attacker authenticates normally and obtains a valid session cookie.
- Attacker sends
POST /api/v1/forum/votewithdirection: "invalid_direction"against a target post ID, which the backend miscounts as a downvote. - Attacker immediately sends a second request with
direction: nullto reset their vote state, allowing the cycle to repeat. - Repeating steps 2-3 lets a single account decrement a post’s vote count an arbitrary number of times.
Impact
Allows any authenticated user to silently manipulate content ranking/visibility by deflating vote counts on arbitrary forum posts, undermining the integrity of the community voting system.
Environment / Lab Setup
Target: PolarLearn forum instance (polarlearn.nl or self-hosted equivalent)
Attacker: Node.js 18+ (native fetch), valid session cookie, target post ID
Proof of Concept
PoC Script
See
poc.jsin this folder.
| |
Before running, edit POST_ID and COOKIE constants in the script. It sends 5 alternating cycles of an invalid direction vote followed by a null reset vote against the target post, decrementing the vote count each cycle.
Detection & Indicators of Compromise
Signs of compromise:
- Forum posts with vote counts dropping unexpectedly without corresponding legitimate downvotes
- Server logs showing
directionvalues other thanup,down, ornull - Bursts of rapid vote requests from a single authenticated session
Remediation
| Action | Detail |
|---|---|
| Primary fix | Enforce strict runtime validation on direction, accepting only "up", "down", or null, rejecting all else with HTTP 400 (per GHSA-ghpx-5w2p-p3qp) |
| Interim mitigation | Add server-side rate limiting on the vote endpoint per user/post and audit stored vote records for invalid values |
References
Notes
Mirrored from https://github.com/Jvr2022/CVE-2026-25126 on 2026-07-05.
| |