Abstract Carbon content in the Earth's depleted upper mantle has been estimated in previous studies using CO2/Ba ratios of CO2 undersaturated depleted mid-ocean ridge basalt (D-MORB) glasses and melt inclusions. However, CO2/Ba ratios in CO2 undersaturated MORB may not necessarily record those of the mantle source, as they may be affected by (1) assimilation of Ba-rich plagioclase-bearing rocks in the oceanic crust and (2) CO2 degassing through partial degassing and mixing. In this study, we evaluate these effects on the CO2/Ba ratios as well as other volatile to refractory trace element ratios (H2O/Ce, F/Nd, Cl/K, and S/Dy) in D-MORBs using the compositions of olivine-hosted melt inclusions and glasses from the Siqueiros and Garrett transform faults. The Siqueiros and Garrett melt inclusions are CO2 undersaturated and highly depleted in incompatible trace elements, and their average CO2/Ba ratios show relatively large ranges of 90 ± 34 and 144 ± 53 respectively. A subset of melt inclusions in lavas from both transform faults show potential signatures of contamination by plagioclase-rich rocks, such as correlations between major elements contents (e.g., FeO, Al2O3, and MgO), and trace element ratios (e.g., Sr/Nd). We find that (1) assimilation fractional crystallization (AFC) of gabbro into D-MORB and (2) mixing between partial melts of gabbro and D-MORB can reproduce the observed range in Sr/Nd ratios as well as the general trends between major elements. However, we find that these processes had limited effects on the CO2/Ba ratio of the melt inclusions and it is unlikely that they can account for the observed range in the CO2/Ba ratio. On the other hand, while a partial degassing and mixing model can generate melts with large range of CO2/Ba ratios (as proposed by Matthews et al. (2017)), it cannot reproduce the Pearson correlation coefficients between CO2/trace element and 1/trace element ratios observed in the Siqueiros and Garrett melt inclusions. Instead, when analytical uncertainties on the elemental concentrations are considered, a model without partial degassing can adequately reproduce the majority of the observed range in CO2/Ba ratio and Pearson correlation coefficients. Hence, we postulate that the Siqueiros and Garrett melt inclusions are undegassed and use their average CO2/Ba ratios to estimate the Siqueiros and Garrett mantle source CO2 contents (21 ± 2 ppm and 33 ± 6 ppm respectively). We also evaluate the effects of shallow level crustal processes on H2O/Ce, F/Nd, Cl/K, and S/Dy ratios, and after which we filter those effects, we estimate the H2O, F, Cl and S contents in the mantle sources of the Siqueiros (40 ± 8 ppm, 8 ± 1 ppm, 0.22 ± 0.04 ppm, and 113 ± 3 ppm) and Garrett (51 ± 9 ppm, 6 ± 1 ppm, 0.27 ± 0.07 ppm, and 128 ± 7 ppm) melt inclusions.