(1) Background: Preservatives may pose a potential threat to human health. To ensure food safety, this study has devised a method that concurrently detects a dozen preservatives (acetic acid, propionic acid, dehydroacetic acid, benzoic acid, sorbic acid, dimethyl fumarate, methyl parahydroxybenzoate, ethyl parahydroxybenzoate, propyl parahydroxybenzoate, isopropyl parahydroxybenzoate, butyl parahydroxybenzoate, and isobutyl parahydroxybenzoate) in pastry, utilizing gas chromatography–mass spectrometry. (2) Methods: The pastry samples were acidified with hydrochloric acid, extracted with acetonitrile via vortexing, purified by hexane and saturated with sodium chloride solution to remove lipids and impurities, and then concentrated via nitrogen blowing. The method was then quantitatively analyzed using GC-MS with the internal standard method after methanol re-dissolution. (3) Results: The results showed that the content of the 12 preservatives had good linearity within the range of 1.0–50 μg/mL, with correlation coefficients all greater than 0.99. The method detection limit was 0.04–2.00 mg/kg and the quantification limit was 0.12–6.67 mg/kg. The average recovery rates of the samples at three different spiked concentrations of low, medium, and high were 70.18–109.22%, and the relative standard deviations were 1.82–9.79% (n = 6). (4) Conclusions: This method requires a small amount of sample, has high sensitivity, and is simple and fast to operate, making it suitable for the simultaneous determination of 12 preservatives in pastry. This approach contributes to the effective surveillance and regulation of preservative usage in pastries, thereby safeguarding public well-being.