This is illegal. According to the law, if you use your ID card, passport and other identification certificates to apply for a credit card against others' wishes, or if you use a forged or altered ID card to apply for a credit card, you will repay it in time even if the cardholder does not maliciously breach the contract. This behavior damages the national credit card management order, belongs to the act of defrauding credit cards with false identification certificates, and constitutes a crime of obstructing credit card management.
Legal basis: Law of the People's Republic of China on Resident Identity Cards
Sixteenth one of the following acts, given a warning by the public security organs, and impose a fine in 200 yuan, illegal income, confiscate the illegal income:
(a) using false certification materials to defraud the resident identity card;
(2) Renting, lending or transferring a resident identity card;
(3) illegally detaining another person's identity card.