Cosmic Cube is the name of a fictional device that exists in the Marvel Universe.
A Cosmic Cube is a cube-shaped matrix that holds vast energies that are responsive to the wills of sentient beings. A sentient being can use a Cosmic Cube to manifest his thoughts as reality, and thus to accomplish virtually anything he or she desires. The power of a Cosmic Cube is so great, that the nigh-omnipotent Beyonder was actually only a mostly-complete Cosmic Cube. Sentient beings can create a Cosmic Cube by generating a particular kind of force field which opens a rift into another dimension. A force will slip through the rift which can be collected within a matrix, which the force then shapes into a perfect cube (like Owen Reece did when he became Molecule Man). This force provides the power of the Cosmic Cube that has thus been created.
Eventually, a Cosmic Cube will evolve and develop its own sentience, which is influenced by the minds of the sentient beings which have wielded it. The Cosmic Cube that was "created" on Earth by A.I.M. evolved into a being named Kubik.