I read in other answers with similar photos that this is tar from insulation. The insulation is not that old (30 years). Is this burned cable or tar or something else?
While I would play it safe like Harper suggested (turn it off to be sure before any inspection), I would say it's possible this was caused by someone pulling on the cable after it was stapled. There's two signs pointing to it, per the photo
- The staple is askew, causing a potential pinch point
- There's a small welt on the sheath just above the spot in question, indicating a hard pull that was stopped by the cable itself
So it might indeed be burn marks, but caused by something external. If the sheath isn't anything more than scuffed, you're fine
Since the black spot seems going in the insulation material I would consider the cable burned with hot wire exposed.
Considernig the shape of the insulation above the hook I wouldn't consider the wire safe at all.
If it is possible, replace the cable. The sooner, the better. Also consider using conduit to protect new cable and use insulated mounts instead of (metal) pins.
Felt or tar paper can leave black marks on romex. If the right hand side of this photo is the bottom I would say this may be an arc mark and want to pull that staple and get a better inspection of the wire. Romex is usually stapled in the middle of the board so if a nail misses the 2x it won’t hit the wires that may have happened here but it is hard to tell. But I would take a closer look.
Cropped photo House Roof and details Sept 18 2007 001 by G MacRae (CC BY-NC-ND 2.0)
Appears to be acoustical sealant, aka Tremco or "black death". This messy, tar-like substance is used to seal poly vapor barriers. It never really dries and gets all over the place if you're not careful including your clothes, framing, insulation, and of course electric wiring.
You can clean it up with xylene or mineral spirits (see data sheet), but I wouldn't bother.