Lead halide perovskite solar cells (PSCs) have made significant progress due to their low cost and high efficiency. However, the long-term stability and lead toxicity of PSCs remain a huge challenge for further commercialization. Herein, we designed a multifunctional additive, poly(amide ester) (PAE), with photosensitive properties to overcome these difficulties. A unique double-chain copolymer network can be constructed via in situ polymerization induced by ultraviolet (UV) light. The multiple active sites in the polymer chains can passivate various defects and enhance charge transfer. Meanwhile, the vast network provides an effective defense for perovskite to stabilize the internal structure and resist harsh external environments, thus delaying the degradation of devices and maximizing the suppression of toxic lead leakage. Remarkably, the devices protected by the network achieved a champion power conversion efficiency (PCE) of 26.20% (certified as 25.69%), the unencapsulated devices suppressed 80% of lead leakage, and the encapsulated devices maintained 93% of the initial PCE after 1000 h in a humid and thermal environment (65 °C and 85% RH).