Early detection and prevention of internalizing problems demand a thorough exploration of latent vulnerabilities before clinical symptoms emerge. Limited research attention has been paid to the influence of olfactory perception, a flexible factor intricately linked to emotional processing and external environmental factors. This study sought to examine the mediating role of olfactory function in the relationship between childhood trauma, encompassing both dimensions of child abuse and neglect, and internalizing problems. A total of 1661 individuals (801 males, Meanage = 21.67 years) participated in wave 1, with 327 participants (152 males, Meanage = 21.8 1 years) included in the follow-up wave 2 three months later. Online questionnaires, including the Childhood Trauma Questionnaire, Self-reported Olfactory Disorder Questionnaire, Beck Depression Inventory, and General Anxiety Disorder-7, were administered. Mediation tests were conducted using Mplus 8. Our findings revealed a significant mediating effect of olfactory dysfunction between childhood trauma and adult internalizing problems in wave 1 (B = 0.224, 95% CI [0.167, 0.294]). Childhood trauma heightened vulnerability to olfactory dysfunction (B = 0.721, 95% CI [0.671, 0.724]), subsequently exacerbating internalizing problems (B = 0.311, 95% CI [0.226, 0.408]). This effect persisted in longitudinal data (abuse: B = 0.686, p < 0.001; neglect: B = 0.200, p < 0.001). Regarding internalizing problems influenced by olfactory function, childhood abuse had a greater impact compared to childhood neglect (wave 1: χ2 = 56.012, p < 0.001; wave 2: χ2 = 5.156, p = 0.023). This study found that olfactory dysfunction mediated the relationship between childhood trauma and internalizing problems, contributing valuable insights into psychopathology and the early identification of symptoms related to internalizing problems.