Causal inference regarding a hypothesized mediation mechanism relies on the assumptions that there are no omitted pretreatment confounders (i.e., confounders preceding the treatment) of the treatment-mediator, treatment-outcome, and mediator-outcome relationships, and there are no posttreatment confounders (i.e., confounders affected by the treatment) of the mediator-outcome relationship. It is crucial to conduct a sensitivity analysis to determine if a potential violation of the assumptions would easily change analytic conclusions. This article proposes a simulation-based method to assess the sensitivity to unmeasured pretreatment confounding, assuming no posttreatment confounding. It allows one to (a) quantify the strength of an unmeasured pretreatment confounder through its conditional associations with the treatment, mediator, and outcome; (b) simulate the confounder from its conditional distribution; and (c) finally assess its influence on both the point estimation and estimation efficiency by comparing the results before and after adjusting for the simulated confounder in the analysis. The proposed sensitivity analysis strategy can be implemented for any causal mediation analysis method. It is applicable to both randomized experiments and observational studies and to mediators and outcomes of different scales. A visualization tool is provided for vivid representations of the sensitivity analysis results. An R package mediationsens has been developed for researchers to implement the proposed method easily (https://cran.r-project.org/web/packages/mediationsens/index.html). (PsycInfo Database Record (c) 2023 APA, all rights reserved).