“It’s the pressure to create ‘viral’ advertising, the urge to get more views online, that leads people to push the envelope,” said Tor Myhren, president and chief creative officer at Grey New York. He added that another contributing factor was the focus on younger consumers. “There’s so much ‘How do we speak to millennials?’ in meetings,” he said.

The toll that those controversies are taking on the ad business is in some instances more than just embarrassment. Two senior creative executives at JWT India, including a managing partner, lost their jobs after the company produced fake ads for the Ford Figo hatchback that showed women bound and gagged in the trunk as celebrities like Paris Hilton and Silvio Berlusconi sat behind the wheel.

JWT apologized, as did Ford, although there was nothing to suggest that the carmaker had either approved or known about the fake ads.

The celebrities in the Ford India ads appeared without consent, but even instances where stars agree to work with a brand can be fraught with risk.

Those celebrities, particularly rappers and actors with images as rebellious rule-breakers and risk-takers, often appeal to marketers’ youthful target audiences and have huge followings on social media. That is what drew Mountain Dew to Lil Wayne, the rapper who signed a multimillion-dollar celebrity endorsement deal with the soft-drink brand last year. The brand severed ties with the artist last week, however, after the Till family took issue with an ad that referred to Till with vulgar lyrics sung by Lil Wayne on a remix of “Karate Chop,” by the rapper Future.