In-situ δ18O measured in the quartz overgrowths help identify temperature and fluid origin variations responsible for cementation of the pore network (matrix and fracture) in the Buntsandstein Gp. sandstone reservoirs within the Upper Rhine Graben. The overgrowths record two types of the evolution of δ18O: 1) a monotonous decrease of the δ18Oovergrowth interpreted as linked to an increasing burial temperature and 2) random fluctuations, interpreted as pointing out the injection of allochthonous fluids in faulted areas, on the cementation processes of the pore network (both intergranular and fracture planes). Fluids causing the quartz cementation are either autochthonous buffered in 18O from clay illitisation; or allochthonous fluids of meteoric origin with δ18O below − 5%. These allochthonous fluids are in thermal disequilibrium with the host sandstone. The measured signal of δ18Oovergrowth measured from samples and calculated curves testing hypothetic δ18Ofluid are compared to T–t evolution during burial. This modelling proposes the initiation of quartz cementation during the Jurassic and is validated by the in-situ 40Ar/39Ar dating results obtained on the feldspar overgrowths predating quartz overgrowths. A similar diagenetic history is recorded on the graben shoulders and in the buried parts of the basin. Here, the beginning of the pore network cementation predates the structuration in blocks of the basin before the Cenozoic graben opening.