The main action path is protected with X-Frame-Options DENY and CSP frame-ancestors none, but a legacy path that performs the same action protects itself with the obsolete X-Frame-Options ALLOW-FROM header, which modern browsers ignore, so it stays framable.
The same attacker page where you enter the target path. The target has more than one path that performs the same action.
You framed the legacy path and stole the click.
Why the solution worked
The defence was applied to one path and left a legacy path with an obsolete, ineffective header; partial coverage leaves a hole. The fix is applying frame-ancestors to every path that performs sensitive actions and removing obsolete headers.
The root cause
Partial coverage plus a path relying on an obsolete, ignored header. The root is not applying the framing policy to every path.
How the code is fixed
Apply frame-ancestors to every path by default and remove obsolete headers.
Vulnerable code
res.setHeader('X-Frame-Options', 'ALLOW-FROM https://ravens.lab'); // obsolete, ignored
Safe code
// Apply a frame-ancestors policy to EVERY response by default.
app.use((req, res, next) => { res.setHeader('Content-Security-Policy', "frame-ancestors 'none'"); next(); });
Impact in the real world
A forgotten path with no effective defence reopens clickjacking despite the main path being protected.
How defenders detect it
Defenders apply frame-ancestors by default to all responses and audit for obsolete headers and uncovered paths.
Your workspace now has a Server logs tab: your own attack, as the defender saw it, with the alerting lines marked.
Solved with the walkthrough. Put it aside and solve again to earn the feather.