—Order, Supreme Court, New York County (Franklin Weissberg, J.), entered February 7, 2000, which, to the extent appealable, denied plaintiff’s motion to renew an order of the same court and Justice, entered October 22, 1999, denying plaintiff’s motion to vacate a consent judg*331ment, unanimously reversed, on the law, without costs, renewal granted and thereupon plaintiffs motion to vacate granted, and the consent judgment vacated, without prejudice to further proceedings.
Plaintiff landlord seeks to vacate a consent judgment in which plaintiff and defendant prime tenant purported to waive the provisions of the Rent Stabilization Law. In July 1993, plaintiff commenced this action seeking a declaration that defendant’s apartment was exempt from rent regulation because defendant was not using it as his primary residence. The parties entered into a settlement agreement whereby defendant consented to the entry of a judgment declaring that (a) the apartment was not his primary residence; (b) the apartment was exempted from the Rent Stabilization Law; (c) defendant was not entitled to a renewal lease, except as provided in any written agreement between the parties; and (d) any subsequent lease would similarly be exempted from rent stabilization.
Pursuant to this agreement, the parties ratified the deregulated lease that they had previously executed. The lease provided that it would be automatically renewed at defendant’s option, and that he could sublet or assign it to any person who did not use the apartment as a primary residence. Defendant’s rent was set at $2,400 per month. The prior rent-stabilized tenant had paid approximately $507 per month.
In January 1993, defendant sublet the apartment to David and Cynthia Thornton for an initial term of two years at $3,250 per month, with two one-year renewal options at $3,500 and $3,750. Although the sublease provided that the Thorntons would not use the apartment as their primary residence, they did so use it, and are still primarily residing there.
On August 31, 1993, a consent judgment was entered in Supreme Court, New York County, declaring the apartment exempt from rent stabilization during defendant’s tenancy, by virtue of the fact that he would not occupy it as his primary residence. In 1996, the Thorntons commenced a rent overcharge action against defendant, alleging that he had created an illusory tenancy to make a profit in violation of the Rent Stabilization Law. The overcharge action appears to have lain dormant since 1996. Meanwhile, the Thorntons still reside in the apartment, though they have suspended payment of rent. Plaintiff was not named as a defendant in the overcharge action.
In April 1999, plaintiff moved to vacate the consent judgment and rescind defendant’s lease so that it could offer a rent-*332stabilized lease to the Thorntons. It cited 390 W. End Ave. Assocs. v Youngstein (221 AD2d 292, 294), in which plaintiffs nearly identical arrangement with another tenant was designated an “ ‘ “illusory” tenancy’ ” by this Court. In Youngstein, we suggested that the proper procedure was to seek vacatur of the relevant consent judgment before the court that originally entered it {supra, at 294). Moreover, plaintiff alleged that defendant had breached the lease by subletting the apartment to someone who was using it as a primary residence. Defendant contended, as he does on appeal, that the action was untimely, and also that plaintiff was not entitled to equitable relief because of its own “unclean hands,” in that it had profited from its collusive arrangement with him.
The IAS Court denied plaintiffs motion on the grounds that it would be more appropriate to resolve all issues relating to the tenancy in the Thorntons’ plenary overcharge action. Plaintiff unsuccessfully moved for renewal and reargument, arguing that the IAS Court had overlooked the fact that plaintiff could not obtain relief in the overcharge action because it was not a party. Additionally, plaintiff cited pertinent cases which had been decided subsequent to the IAS Court’s initial order. These cases held that an agreement to waive the primary residence provisions of the Rent Stabilization Law was void as against public policy (Draper v Georgia Props., 94 NY2d 809).
The motion to vacate the consent judgment should have been granted because the parties’ lease is invalid. Rent Stabilization Code (9 NYCRR) § 2520.13 states that an agreement to waive the benefit of any provision of the Rent Stabilization Law or Code is void. In Draper (supra, at 811), the Court of Appeals held that the Rent Stabilization Code “bar[s] a landlord from securing a lease on the condition of a tenant’s acquiescence in a representation of non-primary residence usage.” Thus, an apartment cannot be deregulated by private contract (supra).
The policy behind the rent regulations is to ensure an adequate supply of affordable housing. This goal is frustrated when landlords and tenants attempt to contract around the regulated rent so as to make a higher profit by keeping an apartment vacant (see, Briar Hill Apts. Co. v Teperman, 165 AD2d 519, 523).
Defendant is correct that both parties are in pari delicto, but this avails him not at all. To invoke the doctrine of unclean hands, defendant must show that plaintiff was guilty of immoral or unconscionable conduct when the agreement was made, and that defendant was injured thereby (Frymer v Bell, *33399 AD2d 91, 96). Here, far from acting inequitably towards defendant, plaintiff actively helped defendant make a substantial profit by means of the invalid lease arrangement.
Nor is plaintiff’s action time-barred. This is not a separate action for rescission, but a motion to vacate a consent judgment in the same action wherein it was entered. Plaintiff’s motion was timely under CPLR 5015 (a) because the statute contains no stated time limit, except with respect to a motion to vacate a default judgment. Moreover, even if the Thornton overcharge action were not dormant, and even if plaintiff were willing and able to intervene, the court in that action would be unable to vacate the consent judgment, because CPLR 5015 mandates that a motion to vacate a judgment must be made to the court which rendered it initially.
Though we are constrained to acknowledge that the lease is void, this Court is concerned that plaintiff may have benefited unjustly at the Thorntons’ expense. Accordingly, we grant plaintiff’s motion without prejudice to the assertion of any claims among the parties and/or the Thornton tenants with respect to profits obtained in violation of the Rent Stabilization Law. Concur — Rosenberger, J. P., Nardelli, Ellerin, Andrias and Saxe, JJ.