It may not be quite to the letter of the regs but nothing really unsafe about it - if you attempt to draw more than the lighting circuit rating the MCB will just trip. And lighting circuits use generously sized cable compared to rings. That's assuming you have modern lighting wiring with an ECC - older systems didn't require this. Strictly speaking you should use a socket other than a standard 13 amp one - same as you'd do with table lights etc fed from a lighting circuit - to prevent a heavy load being plugged in by mistake. 3 pin 5 amp round pin types are the norm.
My guess was it is wired across a switch pair rather than feed. So ends up in series with one of the upstairs lights. Is it easy to trace the wiring back to the junction box etc it's picked up from?