If you can book it and ticket it you'll be OK. If you miss the connection then you would be allowed to standby for a later flight that day. The term "illegal" in this case does not mean you have done something wrong that would entitle the airline to deny you your return flight. It just means that they don't like booking such tight connections because they would be missed frequently.
If you can manage to slip it past United.com then go for it. If you decide to do this, I wouldn't call and talk to an agent for any reason regarding that itinerary because they may try to make you change it. But I guess the worst case scenario then would be you get confirmed on a later flight and then just stand by on the earlier one if you make it to JFK in time.