Treatment for a corneal ulcer is prescribed based on its underlying cause. Antiviral, antifungal, or antibacterial medication is commonly prescribed to treat mild to moderate infection. Medication may be administered as eye drops. To coincide with medicated eye drops, a corticosteroid eye drop may also be prescribed to reduce inflammation around the cornea. Severe cases of corneal ulcers may require surgery to replace the affected cornea.