Put on rubber gloves and combine one part trisodium phosphate, commonly abbreviated TSP, with three parts water in a bucket.
Clean the vinyl railing with the mixture and a sponge. Then rinse with plain water and allow to air-dry completely.
Fill the cracks in the vinyl railing with plastic body filler with hardener, using a plastic putty knife or paintbrush. Let the plastic body filler with hardener dry for at least one hour.
Gently sand the plastic body filler with medium-grit sandpaper to make that area flush with the rest of the railing, then use fine-grit sandpaper to make the patch smooth. Wipe away any dust with a cloth once smooth.
Spray on a coat of vinyl paint in a matching color and allow to dry, then apply a second coat if necessary to make it the same shade.