It's a little hard to tell from the pics, but that looks like classic rodent damage to me. I just refurbished my entire harness and had to patch in two new wires where mice had made a nest our of the headlight motor wires. They looked exactly like yours. Do a thorough inspection as others have suggested to make sure that's the only issue, but if the insulation looks chewed and not scorched or melted, I'm betting the damage is limited to those free ends..
EDIT: In looking at the pics again, I noticed the same wire is affected on both sides and it does look like there is some scorching. So you probably have a short.If you want to replace the terminals with OEM, here are the digikey links to them:
https://www.digikey.com/product-detail/en/t...584CT-ND/456679and
https://www.digikey.com/product-detail/en/t...587CT-ND/456680The second link is for larger gauge wire to fit terminals on the double wires. In theory, those should work for both single and double 18 gauge, but I found I got better crimpls on single 18 guage using the smaller terminals in the first link. They are inexpensive.
If it were me, I'd order some color matching GXL rated 18 gauge wire on ebay. You can splice it in with either quality crimp butt connectors or solder and like others have said, protect the splice with heat shrink. I prefer solder but I guess the aviation industry and military prefer crimp. If you solder, google "lineman's splice" for the correct wrap. To crimp the terminals above, you'll need a crimping tool for uninsulated, open barrell (or F-crimp). I got a pretty cheap tool at Lowe's that makes good crimps but get extra terminals to practice on.
If you want color-coordinated heat shrink, PM me and I'll send you some.