Studies evaluating the occurrence of enteropathogenic bacteria in urban rats (Rattus spp.) are scarce worldwide, specifically in the urban environments of tropical countries. This study aims to estimate the prevalence of diarrhoeagenic Escherichia coli (DEC) and Salmonella spp. with zoonotic potential in urban slum environments. We trapped rats between April and June 2018 in Salvador, Brazil. We collected rectal swabs from Rattus spp., and cultured for E. coli and Salmonella spp., and screened E. coli isolates by polymerase chain reaction to identify pathotypes. E. coli were found in 70% of Rattus norvegicus and were found in four Rattus rattus. DEC were isolated in 31.3% of the 67 brown rats (R. norvegicus). The pathotypes detected more frequently were shiga toxin E. coli in 11.9%, followed by atypical enteropathogenic E. coli in 10.4% and enteroinvasive E. coli in 4.5%. From the five black rats (R. rattus), two presented DEC. Salmonella enterica was found in only one (1.4%) of 67 R. norvegicus. Our findings indicate that both R. norvegicus and R. rattus are host of DEC and, at lower prevalence, S. enterica, highlighting the importance of rodents as potential sources of pathogenic agents for humans.