A peptic ulcer is a mucosal defect that has a diameter of at least 0.5 cm that penetrates the muscularis mucosae. Gastric and duodenal ulcers usually occur in an area of inflamed mucosa.