Once opened petroleum jelly does go bad.
However petroleum jelly usually lasts for up to 10 years.
Sealed petroleum jelly lasts longer than opened petroleum jelly.
Also if you've used your fingers in the petroleum jelly to apply the petroleum jelly to your skin then you could introduce bacteria and contaminates into the petroleum jelly.
That can then make the petroleum jelly go bad sooner.
Once opened it's best to use the petroleum jelly within a year or less.
However even then the petroleum jelly can last 5 to 10 years.
Expired petroleum jelly is safe to use.
Vaseline is the same thing as petroleum jelly and just a brand name.
Vaseline also known as petroleum jelly is made by hydrocarbons that are very slow to break down.
In many cases, a jar of Vaseline or petroleum jelly will last for up to 10 years when stored properly.
So, even if the printed expiration date on your jar of Vaseline or petroleum jelly has come and gone, you can still safely use the petroleum jelly.