JMAP is not JavaScript embedded in email. Are you thinking of something else?
There is no "JavaScript" in JMAP in the sense that it's supported by the protocol, and the specification explicitly warns against email clients interpreting JavaScript.
Potential and actual vulnerabilities explodes, like the chronic problems of Microsoft Macros.