The server allows any Origin whose host ends with ravens.lab, thinking it allows only its own subdomains, but a host like evil-ravens.lab also ends with ravens.lab, passes the check, and the attacker registers it.
The same CORS test page. The server decides which origins may read the account data.
You passed the suffix check and read the response.
Why the solution worked
Suffix matching accepts evil-ravens.lab because it ends with ravens.lab, so the attacker registers such a domain and reads the data. The fix is matching the host exactly, or verifying it is a true subdomain with a dot boundary.
The root cause
A text suffix match instead of an exact host match or a dot-boundary subdomain check. The root is a text check that does not understand domain structure.
How the code is fixed
Match the host exactly or check the subdomain dot boundary, not a text suffix.
Vulnerable code
if (host.endsWith('ravens.lab')) allow(origin); // evil-ravens.lab passes
Safe code
if (host === 'account.ravens.lab' || host.endsWith('.ravens.lab')) allow(origin); // dot boundary
Impact in the real world
Loose suffix checks have let attacker domains read authenticated data in real systems.
How defenders detect it
Defenders match the origin exactly against a list or check the subdomain dot boundary, and alert on odd origins that pass.
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.