Attach
Middle English (in the sense ‘seize by legal authority’): from Old French atachier or estachier ‘fasten, fix’, based on an element of Germanic origin related to stake1; compare with attack.
wiktionary
From Middle English attachen, from Old French atachier, variant of estachier(“bind”), derived from estache(“stick”), from Frankish *stakka(“stick”). Doublet of attack. More at stake, stack.
etymonline
attach (v.)
mid-14c. (mid-13c. in Anglo-Latin), "to take or seize (property or goods) by law," a legal term, from Old French atachier "fasten; arrest" (11c.), earlier estachier "to attach, fix; stake up, support" (Modern French attacher, also compare Italian attaccare), from a- "to" (see ad-) + base also found in detatch, perhaps from Frankish *stakon "a post, stake" or a similar Germanic word, from Proto-Germanic *stakon- "a stake," from PIE root *steg- (1) "pole, stick" (see stake (n.)).
Meaning "to fasten, affix, connect," which probably is the original sense etymologically, is attested in English from c. 1400. Related: Attached; attaching.