Justin Sullivan/Getty

Shares of embattled PG&E Corp.  (PCG) soared Tuesday after a Citigroup analyst upgraded the company to buy from neutral - even as the utility struggles through bankruptcy related to liabilities surrounding last year's devastating wildfires.

Shares of PG&E were up 15.6% to $17.90 in trading on the New York Stock Exchange after Citigroup analyst Praful Mehta said that he believes California lawmakers are likely to change the laws to reduce future wildfire liabilities for PG&E and other utilities.

"Public comments by the Governor and recent conversations with teams in Sacramento suggest that legislation to limit future wildfire risk could be passed in 60-90 days," Mehta wrote in a note to clients. "We rate the stock a buy as we believe that it is pricing in larger dollar liabilities than what PG&E will likely need to bear."

Mehta, who raised his price target on the stock to $33 a share, noted that such pending legislation would unlock "significant upside" for the utility company, though cautioned the utility will still have to assume some liabilities for any future fires.

"While we expect legislative action, we conservatively assume some liabilities from 2019 fires," he said.

California Gov. Gavin Newsom last week said lawyers and financial specialists are working on a plan to keep the utility operational and also determine how to assist those impacted by the wildfires in 2018.