diff --git a/lib/util/package-rules.js b/lib/util/package-rules.js
index 2be457df5e99c47107876a9c920998e149fa85d4..132e24f56c8a40e1b0a2f56b73fc5c0275716c41 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;