Reactive flows in porous media have complex behavior that is influenced by the properties of rocks (e.g., composition, structure) and fluids. In this study, the interaction of citric acid, as a weak acid, with a sandstone core containing ankerite cement was investigated during matrix acidizing. The model, developed in Python, implemented a global implicit numerical approach to consider acid-rock geochemical interactions. The effect of multi-step dissociation of citric acid on lowering rock pH was investigated. The sugar-lump approach was used to estimate the behavior of the ions concentration originated from the variation of the reactive surface area (RSA). The model outputs were validated against matrix sandstone acidizing experiments from the literature. By assuming ankerite as the main reactive mineral and considering several other aqueous reactions, the ions concentration changes (e.g., Ca2+, Fe2+, and Mg2+) of the acidizing experiments were correctly predicted. The effect of the uncertainty of the input parameters on the predictions of the model (i.e., ions concentration) was evaluated using the Monte Carlo method. The geochemical model explained the reaction rate evolution during citric acid injection and evaluated its capacity on dissolving carbonate cement (i.e., ankerite). During the acidizing process, the sandstone RSA increases, achieves a maximum value, and finally decreases. Moreover, the results indicate that the dissociation steps of citric acid have a direct effect on the prediction of acidizing performance.