Puppet Version: 6.24.0 7.10.0
Puppet Server Version: N/A
OS Name/Version: N/A
A 'Runaway Regular Expression' in a single host's manifests can denial of service all your puppetservers.
Puppet to detect that parsing a regex will take forever and fail the compilation.
**Puppet compilation never finishes and puppetservers become unavailable.
The issue can be reproduced with 'puppet apply' eg.
The above command will never exit (given an actual key and not just 'foo' I suspect the heat death of the universe might occur first!).
In the context of puppetserver, the jruby process is never returned to the pool. Eventually, all jruby processes across all puppetservers are taken up and all other requests fail with "Attempt to borrow a JRubyInstance from the pool timed out" errors.
https://www.sysbee.net/blog/sysbee-blog/puppet-timeouts/ describes the same issue (but in that case, the regex was just very very slow, but did eventually parse).
Some online regex testing tools see the issue and refuse to parse the regex. eg.
"Rubular suspects this regex will take forever to parse. Regexes of this sort make Rubular sad."