Listen to this Post
The CSRF vulnerability in 1Panel’s web port configuration functionality arises due to insufficient validation mechanisms on the port-change endpoint. Specifically, the endpoint does not implement anti-CSRF tokens, nor does it validate the Origin or Referer headers of incoming HTTP requests. This oversight allows an attacker to construct a malicious HTML page containing a forged request to change the web service port. When a victim, who is already authenticated to the 1Panel interface, visits this malicious page, their web browser automatically includes valid session cookies with the request. The server, lacking CSRF protections, processes the request as legitimate. Consequently, the attacker can arbitrarily modify the port number on which the 1Panel service listens. This action disrupts access on the original port, leading to denial of service and potential exposure of the administrative interface on an attacker-specified port. The vulnerability exploits the stateless nature of HTTP and the browser’s same-origin policy weaknesses, requiring no direct interaction with the victim beyond luring them to a crafted site. The attack leverages GET or POST methods to submit parameters, such as the new port number, to the vulnerable endpoint without user consent. The severity is elevated because it affects configuration integrity and availability, requiring no privileges beyond an active session.
Platform: 1Panel
Version: 1.10.33-2.0.15
Vulnerability: CSRF
Severity: High
date: Dec 10 2025
Prediction: Patch expected soon
What Undercode Say:
curl -X POST -d "port=9999" http://1panel-host:port/api/port-change
<form action="http://1panel-host:port/api/port-change" method="POST"> <input type="hidden" name="port" value="9999"> </form> <script>document.forms[bash].submit();</script>
how Exploit:
Attacker hosts malicious page. Victim authenticates and visits page. Browser sends forged port-change request.
Protection from this CVE:
Implement anti-CSRF tokens. Validate Origin/Referer headers. Use same-site cookies.
Impact:
Service disruption. Denial of service. Unintended port exposure.
🎯Let’s Practice Exploiting & Learn Patching For Free:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

