Compatible tyre widths for 622 × 17 rims? I have 622 × 17 rims on my hybrid and currently have 700×40c tyres on (came with the bike).

I need a new rear tyre but I am not sure what I can get. From what I can find I should be fitting fairly narrow tyres in the 25-28C range?
If you don't have a specific reason to change size, get the same.

This kind of combination is common, but over the last years there has been some fuss about too narrow rims, in some part because people with limited riding experience like to repeat what they have heard and in part because manufacturers are pushing wider rims.