Gem metadata is information stored with a Ruby package, or “gem,” such as its name, version, description, dependencies, and other attributes supplied by its publisher. Registries use this data to display package details, resolve dependencies, and support publishing and distribution.
Metadata is still untrusted input, even when submitted by an authenticated publisher. If registry software interprets a field as executable logic or compiles it as a regular expression, a specially crafted value may trigger unsafe behavior or expose flaws in the runtime. Defenses include validating fields against expected formats, avoiding compilation of publisher-controlled strings, keeping publishing credentials narrowly scoped, and patching registry software and language runtimes.


