tl;dr: The claim is true. While the Taliban had a history of opposing vaccination campaigns pre-dating Osama bin Laden's death by at least five years, the news of the CIA's fake campaign contributed to increased opposition, with a measurable effect on the rates of polio vaccination of children in regions where the Taliban operated.
There's a recent discussion paper that uses statistical analysis to connect the CIA's fake campaign to vaccination rates in Pakistan: In Vaccines We Trust? The Effects of the CIA’s Vaccine Ruse on Immunization in Pakistan (Martinez-Bravo and Stegmann 2021; pdf here). I've reviewed the sources and related articles to piece this answer together.
Anti-vaccine sentiment from the Taliban was reported as early as 2006, though some polio vaccination campaigns did progress
A report from the Combating Terrorism Center at the West Point U.S. Military Academy, The Pakistani Taliban’s Campaign Against Polio Vaccination traces a bit of the history:
Islamist-led propaganda campaigns against government-backed health projects, especially polio vaccination programs, began in Swat and Malakand regions in 2006. Maulana Fazlullah, the present [Pakistani Taliban] leader [...] alleged that the polio eradication campaign was part of a “conspiracy of Jews and Christians to make Muslims impotent and stunt the growth of Muslims.” [...]
For a brief period after May 2007, the situation improved in the region when the NWFP provincial government signed a peace deal with Fazlullah’s TNSM, which agreed to support the polio vaccination campaign [...] The Taliban in Swat and Malakand agreed not to oppose vaccination against polio, measles, smallpox and tuberculosis, including all those administered to children, and would not obstruct women’s education.
The situation deteriorated, however, following a continuous army offensive against the Pakistani Taliban in the region. By early 2009, the TTP returned to its original campaign against women’s education and vaccination [...]. TTP spokesman Muslim Khan reportedly told the media that “the TTP is against polio vaccination because it causes infertility.” He also charged that the vaccine could not be trusted since it was imported. Khan said that the vaccination program is a U.S. tool to reduce the Muslim population, and that it is un-Islamic to “take a medicine before the disease [is contracted].”
After the CIA's fake vaccination campaign, the Taliban increased vaccine opposition
In July 2011 The Guardian broke the news that the CIA had (unsuccessfully) used a fake vaccination campaign, conducted by Pakistani physician Dr. Shakil Afridi to confirm Osama Bin Laden's location.
There was a correlated rise in anti-vaccine sentiment, which several news agencies reported on:
- NBC News, June 22, 2013, Pakistan aid workers pay the ultimate price for the killing of Osama bin Laden: " Sharafat and Sunbal were killed by unidentified armed men on May 28 in a village in Peshawar, the capital of Khyber Pakhtunkhwa province, where they were administering anti-polio vaccines to the children. They are among 20 people, three of them security personnel, who have been gunned down by suspected militants during the last two years for vaccinating children against polio."
- ABC News, May 26, 2014, Polio resurgence in Pakistan following backlash from CIA vaccination ruse in hunt for Osama bin Laden: "Prior to bin Laden's capture, extremist groups actively discouraged vaccinations. But after it, they began to seriously target inoculators. Dozens have been killed and large parts of the country's north-western tribal areas are no-go zones for vaccination programs. Hundreds of thousands of children have gone unvaccinated there since 2011."
- BBC News, February 17, 2015, Four kidnapped polio workers are found dead in Pakistan: "Four members of a polio vaccination team have been found shot dead in south-west Pakistan, four days after being abducted. [...] The shootings are the latest in a series of attacks on Pakistani polio teams. The violence has claimed the lives of at least 70 polio workers over the last four years."
The Taliban directly cited the CIA's ruse to justify vaccine opposition
From the New York Times article Taliban Block Vaccinations in Pakistan, June 18, 2012:
A Pakistani Taliban commander [(Hafiz Gul Bahadur)] has banned polio vaccinations in North Waziristan, in the tribal belt, days before 161,000 children were to be inoculated. He linked the ban to American drone strikes and fears that the C.I.A. could use the polio campaign as cover for espionage, much as it did with Shakil Afridi, the Pakistani doctor who helped track Osama bin Laden.
The Tribune Express, a Pakistani newspaper, provides additional details in a June 16 article, citing a pamphlet which the Taliban circulated:
The pamphlet also made note of the fake campaign used by Dr Shakil Afridi to identify Osama bin Laden. “There is a high possibility that the campaign be used for spying against the Mujahideen, an apt example for this is Dr.Shakil Afridi, therefore, there shall be a total ban on the anti-polio drive” it concluded.
Statistical analysis indicates that vaccination rates were negatively affected by the resurgence in Taliban efforts following the ruse
Martinez-Bravo and Stegmann 2021 statistically analyze the hypothesis that in Pakistan
the disclosure of the vaccine ruse, and the subsequent Taliban anti-vaccine propaganda campaign, eroded the population’s degree of confidence in vaccines and in health workers.
Data on vaccination status comes from an annually-administered household survey:
Our main data source is the Pakistan Social and Living Standards Measurement (PSLM), a household survey provided by Pakistan’s Bureau of Statistics. This survey contains individual-level data on the vaccination status of each child living in the household. For our main results we focus on waves 2010/11 and 2012/13, which cover the events of interest. Children are geo-coded at the district level. We focus on children living in the 115 districts [...] which contain 97% of the population. Our baseline sample records the vaccination status of 18,795 children born between January 2010 and July 2012 that were up to 24 months old at the time of the interview. Our main outcomes correspond to whether a child has received the first dose of the polio, DPT, or measles vaccine.
Data on support for Islamist groups comes from election results:
As a measure of support for Islamist groups, we collected electoral data from the 2008 legislative elections, which were the closest in time that preceded the disclosure of the vaccine ruse. [...] We aggregate the results at the district level in order to merge the electoral data with our household survey data. Our main measure of support for Islamist groups is the vote share of the Islamist coalition MMA.
These two data points are then related to the typical age of polio vaccine administration relative to the news of the CIA's campaign:
The age profile indicates that most children receive their first [vaccine] dose during the first three months of life. During this period, parents are likely to experience opportunities to vaccinate their children (e.g. during vaccination drives), and a fraction of them agree to vaccinate their children. The age profile also reveals that the probability of having received a vaccine reaches a plateau after the third month. This suggests that parents are likely to have decided whether or not to vaccinate their child after the kid’s third month of life: additional time does not seem to further increase the probability of vaccination.
Given this age profile, we are going to consider the first three months of life of children as the critical window when parents typically decide whether to administer the polio vaccine to their child. The greater the fraction of this period that takes place after the disclosure of the vaccine ruse, the greater the predicted exposure to the information shock. Hence, children born after July 2011 are considered fully exposed: their entire childhood takes place after the information had been disclosed. [...] Children born before the critical window are considered non exposed: the parents of these children are likely to already have taken the decision of whether to administer the polio vaccine or not by the time the information is disclosed.
Finally, the cohorts are divided according to inferred Islamist support and plotted:

[The figure] presents the age profiles of children observed before and after the disclosure of information and across regions with different levels of support for Islamist parties. The left-hand side figures restrict the sample to districts in the first quartile of the distribution of support for Islamist parties. The figures
on the right show the age profiles for districts in the top quartile of the distribution of support for Islamist parties.
In districts with low support for Islamist parties, the age profiles are similar before and after the disclosure of the vaccine ruse. In contrast, in regions with high support for Islamist groups, the age profile shifts downward, indicating a decline in the likelihood of vaccination at different ages. This result is consistent with the hypothesis that, in regions with high levels of support for Islamist groups, a larger fraction of parents were exposed to the anti-vaccine propaganda spread by the Taliban or were more persuaded by it. As a result, a larger fraction of parents became skeptical about vaccines, and decided not to vaccinate their children.
The paper goes on to explain how various effects were controlled for, such as vaccine supply, gender, media consumption, etc.