Source: TW
The invocation of karNapishAchI was probably found in the early bhUta-tantra-s, but its earliest surviving occurrence known to us is in the brahma-yAmala. There was a parallel occurrence in the early kaumAra tradition, which was likely found in the root ShaNmukha-kalpa. That appears to have been transmitted with some usual modifications to the bauddha-s and preserved in their kriyA-tantra, the siddhaikavIra:
OM chaturbhuja ShaNmukha vikR^itAnana karNapishAchIm AkarShaya hUM phaT |
However, it specifies that this mantra should be performed in front of a picture of yamAntaka.
The siddhaikavIra gives a second karNapishAchi mantra that was likely from a shaiva source close to the brahmayAmala:
OM karNapishAchi karNe me kathaya hUM phaT |
This mantra is said to be performed under a possessed tree where pishAcha-s lurk. The bauddha-s make one of their weird claims that “one can even kill +++(chaturmukha-)+++brahman” with it.