Foam is a promising means to assist in the permanent, safe subsurface sequestration of CO2, whether inaquifers or as part of an enhanced-oil-recovery (EOR) process. Here we review the advantages demonstratedfor foam that would assist CO2 sequestration, in particular sweep efficiency and residual trapping, and thechallenges yet to be overcome. CO2 is trapped in porous geological layers by an impermeable overburden layer and residual trapping,dissolution into resident brine, and conversion to minerals in the pore space. Over-filling of geologicaltraps and gravity segregation of injected CO2 can lead to excessive stress and cracking of the overburden.Maximizing storage while minimizing overburden stress in the near term depends on residual trapping inthe swept zone. Therefore, we review the research and field-trial literature on CO2 foam sweep efficiencyand capillary gas trapping in foam. We also review issues involved in surfactant selection for CO2 foamapplications. Foam increases both sweep efficiency and residual gas saturation in the region swept. Both propertiesreduce gravity segregation of CO2. Among gases injected in EOR, CO2 has advantages of easier foamgeneration, better injectivity, and better prospects for long-distance foam propagation at low pressuregradient. In CO2 injection into aquifers, there is not the issue of destabilization of foam by contact with oil,as in EOR. In all reservoirs, surfactant-alternating-gas foam injection maximizes sweep efficiency whilereducing injection pressure compared to direct foam injection. In heterogeneous formations, foam helpsequalize injection over various layers. In addition, spontaneous foam generation at layer boundaries reducesgravity segregation of CO2. Challenges to foam-assisted CO2 sequestration include the following: 1) verifying the advantagesindicated by laboratory research at the field scale 2) optimizing surfactant performance, while furtherreducing cost and adsorption if possible 3) long-term chemical stability of surfactant, and dilution ofsurfactant in the foam bank by flow of water. Residual gas must reside in place for decades, even if surfactantdegrades or is diluted. 4) verifying whether foam can block upward flow of CO2 through overburden, eitherthrough pore pathways or microfractures. 5) optimizing injectivity and sweep efficiency in the field-designstrategy. We review foam field trials for EOR and the state of the art from laboratory and modeling research onCO2 foam properties to present the prospects and challenges for foam-assisted CO2 sequestration.