Deserts, swamps and food oases terms have been used to characterize the food environment according to the identified food availability. Food swamps are defined as neighborhoods with a predominance of food establishments selling ultra-processed foods compared to establishments selling healthy options. In contrast, food oases are areas with easy access to healthy and nutritious foods, such as fruits, vegetables, and other fresh foods. Food deserts describe densely populated urban areas where residents face difficulty obtaining healthy food. In this context, this work aimed to map deserts, swamps, and food oases around federal schools in Bahia, Brazil, emphasizing the importance of implementing the Brazilian National School Feeding Program (PNAE) in these schools, to guarantee food security and nutrition. An ecological study was carried out in all 35 federal schools in Bahia, Brazil, using an 800 m buffer analysis, with the school as the centroid. The geographic coordinates of schools and food establishments were initially obtained using Google Maps and later confirmed onsite. To evaluate food deserts and swamps, the methodology proposed by the CDC was used and the Modified Retail Food Environment Index (mRFEI) was calculated; when the result was equal to zero, the surrounding area was considered a food desert and values between 0.01 and 20 determined food swamps; for values above 20, the neighborhood was classified as mixed. Food oases were considered regions containing at least one supermarket within the analyzed buffer. Descriptive analyses were carried out with frequency measurements, measures of central tendency (mean and median) and dispersion (standard deviation). The food environment of schools was compared considering the number of students impacted, the area where the school was located (urban or rural) and the size of the municipalities. The average number of food establishments found was 22.39 (±13.03), with the highest averages for snack bars (7.33 ± 4.43), grocery stores (5.83 ± 4.09) and restaurants (2.94 ± 2.19). Food deserts and mixed environments were identified in 40% of the sample, while swamps represented 20% and oases 65%. An association was observed between food deserts and social vulnerability, making it necessary to emphasize the importance of adequate implementation of the PNAE in these schools to reduce food and nutritional insecurity, guaranteeing the human right to adequate and healthy food and providing better nutrition and health perspectives within the school environment and impact on students’ lives through food and nutrition education actions, which are also part of the context of PNAE activities.