diff --git a/lib/util/package-rules.js b/lib/util/package-rules.js
index <HASH>..<HASH> 100644
--- a/lib/util/package-rules.js
+++ b/lib/util/package-rules.js
@@ -164,7 +164,7 @@ function applyPackageRules(inputConfig) {
         currentValue && isVersion(currentValue)
           ? currentValue // it's a version so we can match against it
           : lockedVersion || fromVersion; // need to match against this fromVersion, if available
-      if (compareVersion) {
+      if (compareVersion && isVersion(compareVersion)) {
         const isMatch = matches(compareVersion, matchCurrentVersion);
         positiveMatch = positiveMatch || isMatch;
         negativeMatch = negativeMatch || !isMatch;
fix(package-rules): check compareVersion is a version first

Closes #<I>