Nintendo today released the second patch for Pokémon X and Y onto the Nintendo eShop. Among other bugs, this fixes the online battle and trade exploit discovered by the competitive community that allowed online battles to be exploited and the data watched in real time. This, in simple terms, lets someone know what moves you've made as soon as you confirm them - a cheat which provides easy wins every time.
Please note, that as of yesterday (December 12th) this update is required for all users wishing to trade or battle online, and this update also includes the 1.1 update released a couple of months ago. Attempting to trade or battle before updating will throw an error message.
To update, access the Nintendo eShop from the 3DS menu - if you're not prompted to update, search for Pokémon and manually choose the version you own. Alternately, scan the image below with the 3DS camera (press L and R simultaneously on the home screen)
The official patch notes from Nintendo are as follows