SAN FRANCISCO — Nestlé, Epic Games and other major brands said on Wednesday that they had stopped buying advertisements on YouTube after their ads appeared on children’s videos where pedophiles had infiltrated the comment sections.
The companies acted after a YouTube user posted a video this week to point out this behavior. For the most part, the videos targeted by pedophiles did not violate YouTube’s rules and were innocent enough — young girls doing gymnastics, playing Twister or stretching — but the videos became overrun with suggestive remarks directed at the children.
The commenters left time stamps for parts of the video that can appear compromising when paused — like a girl’s backside or bare legs. They also posted remarks that praised the girls, asked whether they were wearing underwear, or simply carried a string of sexually suggestive emojis.
About two years ago, hundreds of companies pulled money from YouTube over concerns about ads showing up next to problematic content from terror or hate groups and videos that seemed to endanger or exploit children.
Over the last year, many major advertisers have returned to the site after they were reassured that YouTube had made progress in flagging and dealing with problematic content more quickly.
The video highlighting the comments, posted by the YouTube creator Matt Watson (also known as MattsWhatItIs) and viewed 1.75 million times since it went up on Sunday, accused YouTube of “facilitating the sexual exploitation” of children. Mr. Watson said YouTube’s recommendation system also guided predators to other similar videos of minors — many of which carry advertisements for major brands.
Chi Hea Cho, a spokeswoman for YouTube’s parent company, Google, said it had deleted the accounts and channels of people leaving the disturbing comments, deleted comments that violate its policies and reported illegal activity to the authorities.
“Any content — including comments — that endangers minors is abhorrent and we have clear policies prohibiting this on YouTube,” said Mrs. Cho. “There’s more to be done, and we continue to work to improve and catch abuse more quickly.”
Many of the advertisers identified in the video and in a subsequent report by Wired — Epic Games, GNC and Nestlé’s companies in the United States — said they had suspended advertising on YouTube. Bloomberg News reported that the Walt Disney Company also halted ads but the company didn’t respond to requests for comment on Wednesday.
“When we learned of this issue, we were — and still are — absolutely horrified and reached out to YouTube to rectify this immediately,” Senka Hadzimuratovic, a spokeswoman for the online grammar tool Grammarly, said in an email. “We have a strict policy against advertising alongside harmful or offensive content and would never knowingly associate ourselves with channels like this. It goes against everything our company stands for.”
In response to the latest concerns, Mrs. Cho said, YouTube disabled comments on tens of millions of videos featuring minors and removed thousands of inappropriate comments on videos with young people in them. She said YouTube had also terminated over 400 YouTube channels for comments that they left on videos and reported illegal comments to the National Center for Missing and Exploited Children.
YouTube has struggled to police children’s content. In late 2017, The New York Times found that disturbing content was showing up in YouTube’s children’s app, which is meant for users under 13. Videos depicted the deaths of beloved cartoon characters and real children in distressing situations.
There have been earlier reports of pedophiles cruising YouTube for videos of minors and leaving lewd or sexual comments. In response, YouTube said in 2017 that it would do more to “protect families” on its platform, pledging to remove videos that endanger children and block inappropriate comments on content featuring minors.
“There are some real questions at this point on whether YouTube is just too big to provide a safe place for children,” said Josh Golin, executive director of the Campaign for a Commercial-Free Childhood.
“If you can’t keep pedophiles from trading information in your comment sections of your videos then you shouldn’t have comment sections of your videos,” Mr. Golin said. “It’s a legitimate question to ask — what are the value of YouTube comments, besides to Google’s bottom line, that’s worth the horribleness that occurs there?”
While YouTube has said it deletes hundreds of millions of comments every quarter that violate its guidelines, the lewd remarks on otherwise innocent videos were not flagged.
Mr. Watson, the maker of the original video, has come under fire from some fellow YouTube users, who have accused him of starting another “adpocalypse” — what many video creators called the plunge in ad revenue from the boycott in 2017 — by shedding light on the issue.
Those critics have said in separate videos online that Mr. Watson should have reported the alleged pedophiles through YouTube’s own tools, rather than draw media and advertiser attention to the matter and risk costing them revenue.