Use code from bundled themes in my theme and resell it

Themes bundled with WordPress are licensed under “GPLv2 or any later version” in full (both code and assets).

You can reuse and resell that code, as long as you abide by the GPL license, effectively meaning — resulting product’s code (and assets if you use them) must be under either of:

  • GPLv2 or later
  • GPLv2 strict
  • GPLv3

with all the implications of.