Stan Lee has a one-second-long cameo appearance in Iron Man 2 (at 00:21, introduced as Larry King):
If Stan Lee doesn't count as a person involved in the production, then Larry Ellison also appears in the same scene for about three seconds.
I'm not sure if this is the briefest cameo ever, just the first thing that satisfies ...
R2-D2 has an extremely brief cameo in Star Trek (2009) as he flies by in a field of debris. He also appears briefly in Star Trek Into Darkness (2013).
Image source: https://www.slashfilm.com/see-the-r2-d2-cameo-in-star-trek-into-darkness/
Documented by fans on YouTube and several reputable publications.
He's almost impossible to spot without freezing the ...
Not the shortest, but may be the shortest with a line of dialogue. And it's my fave.
Hugh Jackman as Wolverine in X-Men - First Class.
I don't think this falls foul of the stinger rule as it was in the movie itself. There was no guarantee he'd turn up later in the franchise either.
WARNING! Swear words!