Tip:Capsaicin is the compound that makes hot chiles hot. It can irritate your skin, so be sure to wear gloves when handling chiles. Ventilate the kitchen, as well, to keep the chile fumes from building up and becoming too intense.
Position a rack about 6 inches from the broiler and heat the broiler on high.
Put the chiles on a broiler pan and broil, flipping as needed, until the skins blister and blacken on all sides, 2 to 3 minutes per side. Transfer the chiles to a large bowl, cover with plastic wrap, and let cool for 10 minutes.
Stem and peel the chiles— it’s fine if some bits of the skin remain—but don’t seed them. Put the chiles, garlic, basil, oregano, celery seed, a big pinch of salt, and 1/2 tsp. pepper in a food processor. With the machine running, slowly add the vinegar through the feed tube and process until smooth. Strain the sauce through a fine sieve and season to taste with more salt. Transfer to bottles. Refrigerate until ready to use.
The sauce will keep in the refrigerator for at least 1 month.