Optical aberrations due to refractive index mismatches occur in various types of microscopy due to refractive differences between the sample and the immersion fluid or within the sample. We study the effects of lateral refractive index differences by fluorescence confocal laser scanning microscopy due to glass or polydimethylsiloxane cuboids and glass cylinders immersed in aqueous fluorescent solution, thereby mimicking realistic imaging situations in the proximity of these materials. The reduction in fluorescence intensity near the embedded objects was found to depend on the geometry and the refractive index difference between the object and the surrounding solution. The observed fluorescence intensity gradients do not reflect the fluorophore concentration in the solution. It is suggested to apply a Gaussian fit or smoothing to the observed fluorescence intensity gradient and use this as a basis to recover the fluorophore concentration in the proximity of the refractive index step change. The method requires that the reference and sample objects have the same geometry and refractive index. The best results were obtained when the sample objects were also used for reference since small differences such as uneven surfaces will result in a different extent of aberration.