Yes, cucumber is a safe vegetable for your pet hamster unless your hamster is allergic. Even though allergies to cucumber is infrequent, it can happen. So, keep an eye on your hamster after feeding it a slice of cucumber for the first time.