Facebook is known for its sophisticated ad targeting that lets brands get super-targeted in how they buy ads, but a possible flaw in the ad-buying system discovered by ProPublica highlights an option that lets brands segment their ad buys to specific ethnicities.

In a ProPublica piece about Facebook's "ethnic affinity" ad-targeting option, the publication reports advertisers can choose to exclude users with specific races from seeing ads. ProPublica purchased an event ad that targeted home owners through the social network and was given the option to pick which ethnicities—African American, Asian American or Hispanic—to target in the campaign.

Like all direct-marketing platforms, Facebook's targeted advertising is designed to exclude people who wouldn't be interested in a product or service. That's normal. But to discriminate ads based on ethnicity alone? That's illegal, ProPublica suggested.

Facebook's entire ad business is based on granular and interest-level targeting (ProPublica estimates that 50,000 such options for ad targeting exist), including the race-based option. Facebook didn't immediately respond to an inquiry about the report.

UPDATE: Christian Martinez, Facebook's head of multicultural, posted a response to the article.

"A nonprofit that's hosting a career fair for the Hispanic community can use Facebook ads to reach people who have an interest in that community. And a merchant selling hair-care products that are designed for black women can reach people who are most likely to want its products," he wrote.

"That merchant also may want to exclude other ethnicities for whom their hair care products are not relevant—this is a process known in the ad industry as "exclusion targeting." This prevents audiences for community-specific ads from seeing a generic ad targeted to a large group and helps avoid the offensive outcome that traditional advertising can often create for people in the minority. This kind of communication is positive: it reflects an advertiser's respect for the diverse communities it is trying to reach. But it's important to know that there's also negative exclusion—for example, an apartment building that won't rent to black people or an employer that only hires men. Our ad policies strictly prohibit this kind of advertising, and it's against the law. If we learn of advertising on our platform that involves this kind of discrimination, we will take aggressive enforcement action. We also realize that, as a website, we often aren't in a position to know the details of an apartment rental or job application—and so we will also remove an ad from our platform if the government agency responsible for enforcing discrimination laws tells us that the ad reflects illegal discrimination."