During the preparation of carbon-based perovskite solar cells, the external stress applied to the carbon paste inevitably compresses the perovskite lattice, potentially damaging its structure and generating defects. This poses a significant threat to the efficiency and stability of devices. Herein, a dual monomer irregular in-situ polymerization method was developed to form a highly elastic network (acrylamide-co-acrylic acid, PAA-co-PAM) within perovskite films, serving as both a ligament to passivate defects and a buffer to improve film stability under stress. The results demonstrated that multiple active sites of PAA-co-PAM could simultaneously passivate positive and negative defects, which improved charge transport efficiency, reduced nonradiative recombination, and prolonged lifetime of carriers. Meanwhile, the cross-linking network in PAA-co-PAM exhibits high elasticity due to both internal hydrogen bonds between monomers and external hydrogen bonds between monomers and perovskite, resulting in films with exceptional structural stability and mechanical resilience. Notably, the corresponding device achieved the power conversion efficiency of 15.39%. Moreover, the unencapsulated photovoltaic device passivated by the elastic network exhibits better storage stability and mechanical stability compared to the control devices. This work provides a new perspective and insight for comprehensively enhancing the stability of carbon-based perovskite solar cells.