A cucumber is 95% water. So it would take a cucumber weighing over approximately 3.6 ounces to be dangerous in the sterile area. I usually carry a much, much smaller cucumber in my pants pocket to avoid being searched at the checkpoint.
Not only are they dangerous, but they're also quite attractive to certain TSA agents.