I'm not entirely sure that this is a quite a "game design" topic, but at the moment this sub-forum seems to me to be the best fit.
In my current project, I've given some thought to the idea of allowing the base game to run what amount to expansion packs: new, shorter games. Importantly, these may introduce new or alter extant game mechanics, meaning that I would want them to be more than just level packs; they would include code of their own.
In thinking about this, however, it occurred to me that this potentially incurs a significant security hole: even if I never provide tools with which the community might make their own modules, it's plausible that either someone will figure it out anyway, or will find a way to subvert an "official" expansion, allowing them to run arbitrary code via the game.
So, my questions: is it worth my being concerned about this, and if so, what approach do you recommend I take to it? Offhand, the (halfway reasonable, to my mind) options that I see are to: remove the capacity for these expansion packs; allow expansions, but force them to use the mechanics already present in the game--no custom code would be read; allow expansions with custom code, but only my own "official" expansions; allow any expansions that are properly integrated with the game.
(I daresay that even the strictest of those approaches listed above isn't entirely impervious to a decent attempt at subversion, but it seems reasonable to me to consider such attempts sufficiently improbable--especially against an indie game--and problematic to deal with that I can ignore them.)