Several key assumptions must be met for mediation analysis to be valid:
No unmeasured confounding between the exposure and the outcome, the exposure and the mediator, and the mediator and the outcome. The mediator is causally situated between the exposure and the outcome. Proper temporal ordering of the variables: exposure precedes mediator, which precedes outcome.