It's illegal. Basically, you own the right to play the game by owning the cart. You do not have the right to take any piece (including the header) of the software on the cart and use it/sell it at your discretion. I'm honestly flabberghasted by the amount of people here that think it's legal. You guys are off your rocker:
Haven't the Copyrights for Old Games Expired?
U.S. copyright laws state that copyrights owned by corporations are valid for 75 years from the date of first publication. Because video games have been around for less than three decades, the copyrights of all video games will not expire for many decades to come.
Are Game Copying Devices Illegal?
Yes. Game copiers enable users to illegally copy video game software onto floppy disks, writeable compact disks or the hard drive of a personal computer. They enable the user to make, play and distribute illegal copies of video game software which violates Nintendo's copyrights and trademarks. These devices also allow for the uploading and downloading of ROMs to and from the Internet. Based upon the functions of these devices, they are illegal.
More information:
https://www.nintendo.com/corp/legal.jsp#download_rom
Ah the law school of Nintendo. The same one that famously called import games illegal. More generally never trust the interpretation of the law from the one that stands to benefit highly.
To be fair I am not actually sure of the legalities here and there is quite a bit of case law in various countries dealing with related concepts. Now, especially as Nintendo's security team was drunk and apparently only skimmed the opening chapter in the 1992 book, or possibly reader's digest article, on network security that they used, they allow a valid header from any game (possibly even a non wifi one?) to be used for any and all other games. The access to the service, while they would be legal and justified in denying to the flash cart set, and the baseline law would be some kind of theft of utilities/server time that they use for theft of wifi and botnets/DDOS/DOS type setups. A general header being sold would possibly count as some kind of attempt to defraud Nintendo by means of costing them network resources which might be usage/bandwidth based back to the dev/project company.
Assuming it is then a header for the game in question (possibly also in the region in question but let us not go there right now), which is a big stretch, and the game is either destroyed or "sold" to the purchaser of the header, is where things get fun. Now I will go back to the theft of services thing as cloning cable/satellite boxes and some aspects of mobile phones are what would provide most case law here.
Of course as part of all this we have to consider what court the thing would be charged in. Most such things like this end up in civil court where proving damages is the order of the day, as indeed it was for said cloning things mentioned in the previous sentence. I am going to have to look for some clear cut cases as most of my usual ones are a mish mash or arguments and appeals but generally if there are no damages then there is no issue is how the courts aim to work. Selling services of such things (and dumping a header is a non trivial task as far as the courts would probably be concerned) is sometimes harder to sort but not impossible -- various companies have taken various others to court when they automate or dodge access requirements in a non damaging* way.
*most of the time this is where the issue lies. For instance if I take my cable box but stick it in my PC and in doing so gain some kind of DVR ability, one said cable company might normally want to sell me for an extra £10 a month, then it can be fun.
The copyrightabilty of the header itself is also questionable. By most accounts it is little more than an access key, one not inherently part of the ROM either, and such things have previously been argued to not need any kind of creative input. Protection of said keys usually being taken by other laws, though the DMCA might say things about unauthorised use of keys (I am not sure if that was part of when it got defanged so I will have to look things up there). On the flip side it is effectively a hardware authentication token or a dongle of sorts and there is some interesting case law there. Equally if you are using an effectively unmodified version of the game you go back to the cable box/mobile phone stuff from earlier.
I would agree that most cases of header selling that we have seen will break a civil law in the US, Europe and most other places with legal systems derived from one or the other, probably not one that would see you justifying your actions in court.
Anyway the general lack of citations of all that much here, to say nothing of a general absence of any concept of jurisdiction, would have just got me kicked in the nuts by a lawyer so I will leave it there. What I am mainly here to say is you want to make it seem very clear cut when there are all sorts of things that could be argued.