HP has issued a battery recall that covers 15 models using a specific battery supplier. A utility has been provided to verify if yours is at risk and HP is providing free battery replacements at authorised repair centers.
https://www.notebookcheck.net/Charred-and-melted-HP-issues-a-battery-recall-for-some-models.276964.0.html