PurposeIt remains unclear why individuals living in disadvantaged neighborhoods have shorter non-small cell lung cancer (NSCLC) survival. It is possible that living in these deprived areas is linked with increased risk of developing aggressive NSCLC biology. Here, we explored the association of somaticKRASmutations, which are associated with shorter survival in NSCLC patients, and 11 definitions of neighborhood disadvantage spanning socioeconomic and structural environmental elements.MethodsWe analyzed data from 429 NSCLC patients treated at a Comprehensive Cancer Center from 2015 to 2018. Data were abstracted from medical records and each patient’s home address was used to assign publicly available indices of neighborhood disadvantage. Prevalence Ratios (PRs) for the presence of somaticKRASmutations were estimated using modified Poisson regression models adjusted for age, sex, smoking status, race/ethnicity, educational attainment, cancer stage, and histology.ResultsIn the NSCLC cohort, 29% hadKRASmutation-positive tumors. We found that five deprivation indices of socioeconomic disadvantage were associated withKRASmutation. A one decile increase in several of these socioeconomic disadvantage indices was associated with a 1.06 to 1.14 increased risk ofKRASmutation. Measures of built structural environment were not associated withKRASmutation status.ConclusionSocioeconomic disadvantage at the neighborhood level is associated with higher risk ofKRASmutation while disadvantage related to built environmental structural measures was inversely associated. Our results indicate not only that neighborhood disadvantage may contribute to aggressive NSCLC biology, but the pathways linking biology to disadvantage are likely operating through socioeconomic-related stress.Supplementary InformationThe online version contains supplementary material available at 10.1007/s00432-022-04455-7.