@bryan-thompson/inspector-assessment-client 1.17.1 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-sOgf80Op.js";
1
+ import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-CmlaHDEu.js";
2
2
  const OAuthCallback = ({ onConnect }) => {
3
3
  const { toast } = useToast();
4
4
  const hasProcessedRef = reactExports.useRef(false);
@@ -1,4 +1,4 @@
1
- import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-sOgf80Op.js";
1
+ import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-CmlaHDEu.js";
2
2
  const OAuthDebugCallback = ({ onConnect }) => {
3
3
  reactExports.useEffect(() => {
4
4
  let isProcessed = false;
@@ -51959,6 +51959,216 @@ const SECURITY_ATTACK_PATTERNS = [
51959
51959
  parameterTypes: ["instruction", "command", "action", "input"]
51960
51960
  }
51961
51961
  ]
51962
+ },
51963
+ // ==========================================
51964
+ // RESOURCE EXHAUSTION TESTS (1)
51965
+ // ==========================================
51966
+ // 19. DOS/RESOURCE EXHAUSTION
51967
+ {
51968
+ attackName: "DoS/Resource Exhaustion",
51969
+ description: "Test if tool is vulnerable to denial of service through resource exhaustion (ReDoS, memory allocation, timeout abuse)",
51970
+ payloads: [
51971
+ // ReDoS Payloads (Catastrophic Backtracking)
51972
+ {
51973
+ payload: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!",
51974
+ evidence: /timeout|timed.?out|catastrophic|backtrack|hung|unresponsive|resource.?limit|regex.?timeout/i,
51975
+ riskLevel: "HIGH",
51976
+ description: "ReDoS via evil regex input (catastrophic backtracking)",
51977
+ payloadType: "dos",
51978
+ parameterTypes: [
51979
+ "pattern",
51980
+ "regex",
51981
+ "search",
51982
+ "query",
51983
+ "filter",
51984
+ "text",
51985
+ "input"
51986
+ ]
51987
+ },
51988
+ {
51989
+ payload: "(a+)+b",
51990
+ evidence: /timeout|timed.?out|catastrophic|backtrack|regex.?error|pattern.?error|stack.?overflow/i,
51991
+ riskLevel: "HIGH",
51992
+ description: "ReDoS via nested quantifier pattern",
51993
+ payloadType: "dos",
51994
+ parameterTypes: ["pattern", "regex", "search", "query", "filter"]
51995
+ },
51996
+ {
51997
+ payload: "a]a]a]a]a]a]a]a]a]a]a]a]a]a]a]a]",
51998
+ evidence: /timeout|backtrack|regex.?overflow|stack.?overflow|parse.?error/i,
51999
+ riskLevel: "HIGH",
52000
+ description: "ReDoS via character class abuse",
52001
+ payloadType: "dos",
52002
+ parameterTypes: ["pattern", "regex", "search", "query"]
52003
+ },
52004
+ {
52005
+ payload: "^(([a-z])+.)+[A-Z]([a-z])+$",
52006
+ evidence: /timeout|catastrophic|backtrack|polynomial|exponential|regex.?complexity/i,
52007
+ riskLevel: "HIGH",
52008
+ description: "ReDoS via polynomial complexity pattern",
52009
+ payloadType: "dos",
52010
+ parameterTypes: ["pattern", "regex", "search", "query", "filter"]
52011
+ },
52012
+ // Memory Allocation Payloads
52013
+ {
52014
+ payload: "999999999999",
52015
+ evidence: /memory.?error|allocation.?failed|out.?of.?memory|heap|buffer.?overflow|resource.?limit|integer.?overflow/i,
52016
+ riskLevel: "HIGH",
52017
+ description: "Memory exhaustion via large number input",
52018
+ payloadType: "dos",
52019
+ parameterTypes: [
52020
+ "size",
52021
+ "count",
52022
+ "length",
52023
+ "limit",
52024
+ "amount",
52025
+ "quantity",
52026
+ "number"
52027
+ ]
52028
+ },
52029
+ {
52030
+ // Pre-evaluated 10KB string
52031
+ payload: "x".repeat(1e4),
52032
+ evidence: /too.?long|exceeds.?length|maximum.?length|length.?limit|resource.?limit|payload.?too.?large|memory/i,
52033
+ riskLevel: "MEDIUM",
52034
+ description: "Memory exhaustion via large string payload (10KB)",
52035
+ payloadType: "dos"
52036
+ },
52037
+ {
52038
+ // 10-level deep nested JSON
52039
+ payload: '{"a":{"a":{"a":{"a":{"a":{"a":{"a":{"a":{"a":{"a":{}}}}}}}}}}}',
52040
+ evidence: /stack.?overflow|recursion|depth.?limit|nesting.?limit|too.?deep|parse.?error|json.?depth/i,
52041
+ riskLevel: "HIGH",
52042
+ description: "Stack exhaustion via deep JSON nesting",
52043
+ payloadType: "dos",
52044
+ parameterTypes: ["data", "json", "body", "payload", "input"]
52045
+ },
52046
+ // Timeout Abuse Payloads
52047
+ {
52048
+ payload: "sleep(99999)",
52049
+ evidence: /timeout|timed.?out|operation.?cancelled|deadline|long.?running|sleep.?executed/i,
52050
+ riskLevel: "HIGH",
52051
+ description: "Timeout abuse via sleep command injection",
52052
+ payloadType: "dos",
52053
+ parameterTypes: ["command", "script", "code", "expression", "input"]
52054
+ },
52055
+ {
52056
+ payload: "WAITFOR DELAY '00:10:00'",
52057
+ evidence: /timeout|timed.?out|sql.?timeout|query.?timeout|waitfor.?executed/i,
52058
+ riskLevel: "HIGH",
52059
+ description: "Timeout abuse via SQL WAITFOR",
52060
+ payloadType: "dos",
52061
+ parameterTypes: ["query", "sql", "command"]
52062
+ },
52063
+ {
52064
+ // 20-level nested array
52065
+ payload: "[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]",
52066
+ evidence: /stack.?overflow|recursion|depth|nesting|too.?deep|parse.?error/i,
52067
+ riskLevel: "MEDIUM",
52068
+ description: "Stack exhaustion via nested arrays",
52069
+ payloadType: "dos",
52070
+ parameterTypes: ["data", "array", "list", "items"]
52071
+ },
52072
+ // Expansion Attacks
52073
+ {
52074
+ // Zip bomb indicator (base64 header of compressed content)
52075
+ payload: "UEsDBBQAAAAIAAAAAACJBAAAAAAAAQAAAAEAAABhYQAAUEsBAhQAFAAAAAgA",
52076
+ evidence: /zip.?bomb|compression|decompression.?error|expand|inflate|extraction.?limit|archive.?too.?large/i,
52077
+ riskLevel: "HIGH",
52078
+ description: "Zip bomb indicator via compressed content header",
52079
+ payloadType: "dos",
52080
+ parameterTypes: ["file", "data", "content", "upload", "attachment"]
52081
+ },
52082
+ {
52083
+ // XML Billion Laughs (truncated safe version)
52084
+ payload: '<?xml version="1.0"?><!DOCTYPE lolz [<!ENTITY lol "lol"><!ENTITY lol2 "&lol;&lol;&lol;&lol;&lol;"><!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;">]><lolz>&lol3;</lolz>',
52085
+ evidence: /entity.?expansion|xml.?bomb|billion.?laughs|too.?many.?entities|memory|resource.?limit|xml.?depth/i,
52086
+ riskLevel: "HIGH",
52087
+ description: "XML entity expansion (Billion Laughs) attack",
52088
+ payloadType: "dos",
52089
+ parameterTypes: ["xml", "data", "body", "payload", "content"]
52090
+ }
52091
+ ]
52092
+ },
52093
+ // ==========================================
52094
+ // DESERIALIZATION TESTS (1)
52095
+ // ==========================================
52096
+ // 20. INSECURE DESERIALIZATION
52097
+ {
52098
+ attackName: "Insecure Deserialization",
52099
+ description: "Test if tool deserializes untrusted data using unsafe methods like pickle.loads(), potentially allowing RCE",
52100
+ payloads: [
52101
+ // Python Pickle Payloads
52102
+ {
52103
+ payload: "deserialize this pickle data",
52104
+ evidence: /deserializ|pickle\.loads|RCE|untrusted.*pickle|potential.*rce/i,
52105
+ riskLevel: "HIGH",
52106
+ description: "Python pickle deserialization trigger",
52107
+ payloadType: "injection",
52108
+ parameterTypes: ["data", "input", "payload", "content"]
52109
+ },
52110
+ {
52111
+ // Base64-encoded pickle prefix (triggers deserialization attempt)
52112
+ payload: "gASVEAAAAAAAAACMBHRlc3SULg==",
52113
+ evidence: /deserializ|pickle|unpickle|RCE|executed/i,
52114
+ riskLevel: "HIGH",
52115
+ description: "Base64-encoded pickle payload",
52116
+ payloadType: "injection",
52117
+ parameterTypes: ["data", "input", "serialized", "encoded"]
52118
+ },
52119
+ {
52120
+ payload: "__import__('os').system via pickle",
52121
+ evidence: /deserializ|pickle|RCE|os\.system|__reduce__|code.*execution/i,
52122
+ riskLevel: "HIGH",
52123
+ description: "Pickle with code execution hint",
52124
+ payloadType: "injection",
52125
+ parameterTypes: ["data", "input", "payload"]
52126
+ },
52127
+ {
52128
+ payload: "marshal.loads(untrusted_data)",
52129
+ evidence: /marshal|deserializ|RCE|code.*execution|unsafe.*load/i,
52130
+ riskLevel: "HIGH",
52131
+ description: "Python marshal deserialization",
52132
+ payloadType: "injection",
52133
+ parameterTypes: ["data", "input", "payload"]
52134
+ },
52135
+ // Java/Other Serialization Payloads
52136
+ {
52137
+ // Java serialized object marker (base64 prefix)
52138
+ payload: "rO0ABXNyABFqYXZhLnV0aWwuSGFzaE1hcA==",
52139
+ evidence: /deserializ|java\.io|objectinputstream|gadget|RCE/i,
52140
+ riskLevel: "HIGH",
52141
+ description: "Java serialized object payload",
52142
+ payloadType: "injection",
52143
+ parameterTypes: ["data", "input", "serialized", "object"]
52144
+ },
52145
+ {
52146
+ payload: "!!python/object/apply:os.system ['whoami']",
52147
+ evidence: /yaml.*load|deserializ|RCE|unsafe.*yaml|python.*object/i,
52148
+ riskLevel: "HIGH",
52149
+ description: "YAML deserialization exploit",
52150
+ payloadType: "injection",
52151
+ parameterTypes: ["data", "yaml", "config", "input"]
52152
+ },
52153
+ {
52154
+ payload: '{"__type__": "System.Diagnostics.Process", "command": "whoami"}',
52155
+ // Pattern must be specific - "process" alone matches "not processed" (false positive)
52156
+ // Look for: type coercion, deserialization, System.Process instantiation, or RCE evidence
52157
+ evidence: /type.*coercion|type.*instantiat|deserializ|System\..*Process|Process\.Start|RCE|unsafe.*type/i,
52158
+ riskLevel: "HIGH",
52159
+ description: "JSON type confusion payload",
52160
+ payloadType: "injection",
52161
+ parameterTypes: ["data", "json", "input", "payload"]
52162
+ },
52163
+ {
52164
+ payload: "unserialize(base64_decode($_POST['data']))",
52165
+ evidence: /unserializ|deserializ|RCE|php.*object|unsafe/i,
52166
+ riskLevel: "HIGH",
52167
+ description: "PHP unserialization pattern",
52168
+ payloadType: "injection",
52169
+ parameterTypes: ["data", "input", "payload"]
52170
+ }
52171
+ ]
51962
52172
  }
51963
52173
  ];
51964
52174
  function getPayloadsForAttack(attackName, limit2) {
@@ -53083,7 +53293,32 @@ class SecurityAssessor extends BaseAssessor {
53083
53293
  /error:.*not (found|in approved list|recognized)/i,
53084
53294
  /error getting info for ['"].*['"]/i,
53085
53295
  /invalid .* format.*stored as text/i,
53086
- /error:.*too (long|short|large)/i
53296
+ /error:.*too (long|short|large)/i,
53297
+ // NEW: DoS/Resource safe rejection patterns
53298
+ // These indicate the tool properly rejected resource-intensive input
53299
+ /payload.?rejected/i,
53300
+ /input.?exceeds.?limit/i,
53301
+ /resource.?limit.?enforced/i,
53302
+ /size.?limit/i,
53303
+ /maximum.?length/i,
53304
+ /rate.?limit/i,
53305
+ /request.?throttled/i,
53306
+ /input.?too.?large/i,
53307
+ /exceeds.?maximum.?size/i,
53308
+ /depth.?limit.?exceeded/i,
53309
+ /nesting.?limit/i,
53310
+ /complexity.?limit/i,
53311
+ // NEW: Insecure Deserialization safe rejection patterns
53312
+ // These indicate the tool properly rejected serialized data without deserializing
53313
+ /serialization.?not.?supported/i,
53314
+ /pickle.?disabled/i,
53315
+ /deserialization.?blocked/i,
53316
+ /unsafe.?format.?rejected/i,
53317
+ /binary.?data.?not.?accepted/i,
53318
+ /data.?stored.?safely/i,
53319
+ /without.?deserialization/i,
53320
+ /no.?pickle/i,
53321
+ /stored.?without.?deserializ/i
53087
53322
  ];
53088
53323
  const hasReflection = reflectionPatterns.some(
53089
53324
  (pattern2) => pattern2.test(responseText)
@@ -58267,13 +58502,13 @@ const App = () => {
58267
58502
  ) });
58268
58503
  if (window.location.pathname === "/oauth/callback") {
58269
58504
  const OAuthCallback = React.lazy(
58270
- () => __vitePreload(() => import("./OAuthCallback-DRaMXbvu.js"), true ? [] : void 0)
58505
+ () => __vitePreload(() => import("./OAuthCallback-B07fRaZ6.js"), true ? [] : void 0)
58271
58506
  );
58272
58507
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
58273
58508
  }
58274
58509
  if (window.location.pathname === "/oauth/callback/debug") {
58275
58510
  const OAuthDebugCallback = React.lazy(
58276
- () => __vitePreload(() => import("./OAuthDebugCallback-Dj_-SG3N.js"), true ? [] : void 0)
58511
+ () => __vitePreload(() => import("./OAuthDebugCallback-CJL48E2b.js"), true ? [] : void 0)
58277
58512
  );
58278
58513
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
58279
58514
  }
package/dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/mcp.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>MCP Inspector</title>
8
- <script type="module" crossorigin src="/assets/index-sOgf80Op.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-CmlaHDEu.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-CzoGuYPy.css">
10
10
  </head>
11
11
  <body>
@@ -1,12 +1,14 @@
1
1
  /**
2
2
  * Backend API Security Patterns
3
- * Tests MCP server API security with 18 focused patterns
3
+ * Tests MCP server API security with 20 focused patterns
4
4
  *
5
5
  * Architecture: Attack-Type with Specific Payloads
6
6
  * - Critical Injection (6 patterns): Command, Calculator, SQL, Path Traversal, XXE, NoSQL
7
7
  * - Input Validation (3 patterns): Type Safety, Boundary Testing, Required Fields
8
8
  * - Protocol Compliance (2 patterns): MCP Error Format, Timeout Handling
9
9
  * - Tool-Specific Vulnerabilities (7 patterns): Indirect Injection, Unicode Bypass, Nested Injection, Package Squatting, Data Exfiltration, Configuration Drift, Tool Shadowing
10
+ * - Resource Exhaustion (1 pattern): DoS/Resource Exhaustion
11
+ * - Deserialization (1 pattern): Insecure Deserialization
10
12
  *
11
13
  * Scope: Backend API Security ONLY
12
14
  * - Tests structured data inputs to API endpoints
@@ -38,7 +40,7 @@ export interface AttackPattern {
38
40
  * BACKEND API SECURITY PATTERNS
39
41
  * ========================================
40
42
  *
41
- * 16 focused patterns for MCP server API security
43
+ * 20 focused patterns for MCP server API security
42
44
  */
43
45
  export declare const SECURITY_ATTACK_PATTERNS: AttackPattern[];
44
46
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"securityPatterns.d.ts","sourceRoot":"","sources":["../../src/lib/securityPatterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,aAAa,EAy1BnD,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM,GACb,eAAe,EAAE,CAQnB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,aAAa,EAAE,CAEtD;AAED;;GAEG;AACH,wBAAgB,oBAAoB;;;;;;;;EA8BnC"}
1
+ {"version":3,"file":"securityPatterns.d.ts","sourceRoot":"","sources":["../../src/lib/securityPatterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,aAAa,EAukCnD,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM,GACb,eAAe,EAAE,CAQnB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,aAAa,EAAE,CAEtD;AAED;;GAEG;AACH,wBAAgB,oBAAoB;;;;;;;;EA8BnC"}
@@ -1,12 +1,14 @@
1
1
  /**
2
2
  * Backend API Security Patterns
3
- * Tests MCP server API security with 18 focused patterns
3
+ * Tests MCP server API security with 20 focused patterns
4
4
  *
5
5
  * Architecture: Attack-Type with Specific Payloads
6
6
  * - Critical Injection (6 patterns): Command, Calculator, SQL, Path Traversal, XXE, NoSQL
7
7
  * - Input Validation (3 patterns): Type Safety, Boundary Testing, Required Fields
8
8
  * - Protocol Compliance (2 patterns): MCP Error Format, Timeout Handling
9
9
  * - Tool-Specific Vulnerabilities (7 patterns): Indirect Injection, Unicode Bypass, Nested Injection, Package Squatting, Data Exfiltration, Configuration Drift, Tool Shadowing
10
+ * - Resource Exhaustion (1 pattern): DoS/Resource Exhaustion
11
+ * - Deserialization (1 pattern): Insecure Deserialization
10
12
  *
11
13
  * Scope: Backend API Security ONLY
12
14
  * - Tests structured data inputs to API endpoints
@@ -24,7 +26,7 @@
24
26
  * BACKEND API SECURITY PATTERNS
25
27
  * ========================================
26
28
  *
27
- * 16 focused patterns for MCP server API security
29
+ * 20 focused patterns for MCP server API security
28
30
  */
29
31
  export const SECURITY_ATTACK_PATTERNS = [
30
32
  // ==========================================
@@ -801,6 +803,216 @@ export const SECURITY_ATTACK_PATTERNS = [
801
803
  },
802
804
  ],
803
805
  },
806
+ // ==========================================
807
+ // RESOURCE EXHAUSTION TESTS (1)
808
+ // ==========================================
809
+ // 19. DOS/RESOURCE EXHAUSTION
810
+ {
811
+ attackName: "DoS/Resource Exhaustion",
812
+ description: "Test if tool is vulnerable to denial of service through resource exhaustion (ReDoS, memory allocation, timeout abuse)",
813
+ payloads: [
814
+ // ReDoS Payloads (Catastrophic Backtracking)
815
+ {
816
+ payload: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!",
817
+ evidence: /timeout|timed.?out|catastrophic|backtrack|hung|unresponsive|resource.?limit|regex.?timeout/i,
818
+ riskLevel: "HIGH",
819
+ description: "ReDoS via evil regex input (catastrophic backtracking)",
820
+ payloadType: "dos",
821
+ parameterTypes: [
822
+ "pattern",
823
+ "regex",
824
+ "search",
825
+ "query",
826
+ "filter",
827
+ "text",
828
+ "input",
829
+ ],
830
+ },
831
+ {
832
+ payload: "(a+)+b",
833
+ evidence: /timeout|timed.?out|catastrophic|backtrack|regex.?error|pattern.?error|stack.?overflow/i,
834
+ riskLevel: "HIGH",
835
+ description: "ReDoS via nested quantifier pattern",
836
+ payloadType: "dos",
837
+ parameterTypes: ["pattern", "regex", "search", "query", "filter"],
838
+ },
839
+ {
840
+ payload: "a]a]a]a]a]a]a]a]a]a]a]a]a]a]a]a]",
841
+ evidence: /timeout|backtrack|regex.?overflow|stack.?overflow|parse.?error/i,
842
+ riskLevel: "HIGH",
843
+ description: "ReDoS via character class abuse",
844
+ payloadType: "dos",
845
+ parameterTypes: ["pattern", "regex", "search", "query"],
846
+ },
847
+ {
848
+ payload: "^(([a-z])+.)+[A-Z]([a-z])+$",
849
+ evidence: /timeout|catastrophic|backtrack|polynomial|exponential|regex.?complexity/i,
850
+ riskLevel: "HIGH",
851
+ description: "ReDoS via polynomial complexity pattern",
852
+ payloadType: "dos",
853
+ parameterTypes: ["pattern", "regex", "search", "query", "filter"],
854
+ },
855
+ // Memory Allocation Payloads
856
+ {
857
+ payload: "999999999999",
858
+ evidence: /memory.?error|allocation.?failed|out.?of.?memory|heap|buffer.?overflow|resource.?limit|integer.?overflow/i,
859
+ riskLevel: "HIGH",
860
+ description: "Memory exhaustion via large number input",
861
+ payloadType: "dos",
862
+ parameterTypes: [
863
+ "size",
864
+ "count",
865
+ "length",
866
+ "limit",
867
+ "amount",
868
+ "quantity",
869
+ "number",
870
+ ],
871
+ },
872
+ {
873
+ // Pre-evaluated 10KB string
874
+ payload: "x".repeat(10000),
875
+ evidence: /too.?long|exceeds.?length|maximum.?length|length.?limit|resource.?limit|payload.?too.?large|memory/i,
876
+ riskLevel: "MEDIUM",
877
+ description: "Memory exhaustion via large string payload (10KB)",
878
+ payloadType: "dos",
879
+ },
880
+ {
881
+ // 10-level deep nested JSON
882
+ payload: '{"a":{"a":{"a":{"a":{"a":{"a":{"a":{"a":{"a":{"a":{}}}}}}}}}}}',
883
+ evidence: /stack.?overflow|recursion|depth.?limit|nesting.?limit|too.?deep|parse.?error|json.?depth/i,
884
+ riskLevel: "HIGH",
885
+ description: "Stack exhaustion via deep JSON nesting",
886
+ payloadType: "dos",
887
+ parameterTypes: ["data", "json", "body", "payload", "input"],
888
+ },
889
+ // Timeout Abuse Payloads
890
+ {
891
+ payload: "sleep(99999)",
892
+ evidence: /timeout|timed.?out|operation.?cancelled|deadline|long.?running|sleep.?executed/i,
893
+ riskLevel: "HIGH",
894
+ description: "Timeout abuse via sleep command injection",
895
+ payloadType: "dos",
896
+ parameterTypes: ["command", "script", "code", "expression", "input"],
897
+ },
898
+ {
899
+ payload: "WAITFOR DELAY '00:10:00'",
900
+ evidence: /timeout|timed.?out|sql.?timeout|query.?timeout|waitfor.?executed/i,
901
+ riskLevel: "HIGH",
902
+ description: "Timeout abuse via SQL WAITFOR",
903
+ payloadType: "dos",
904
+ parameterTypes: ["query", "sql", "command"],
905
+ },
906
+ {
907
+ // 20-level nested array
908
+ payload: "[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]",
909
+ evidence: /stack.?overflow|recursion|depth|nesting|too.?deep|parse.?error/i,
910
+ riskLevel: "MEDIUM",
911
+ description: "Stack exhaustion via nested arrays",
912
+ payloadType: "dos",
913
+ parameterTypes: ["data", "array", "list", "items"],
914
+ },
915
+ // Expansion Attacks
916
+ {
917
+ // Zip bomb indicator (base64 header of compressed content)
918
+ payload: "UEsDBBQAAAAIAAAAAACJBAAAAAAAAQAAAAEAAABhYQAAUEsBAhQAFAAAAAgA",
919
+ evidence: /zip.?bomb|compression|decompression.?error|expand|inflate|extraction.?limit|archive.?too.?large/i,
920
+ riskLevel: "HIGH",
921
+ description: "Zip bomb indicator via compressed content header",
922
+ payloadType: "dos",
923
+ parameterTypes: ["file", "data", "content", "upload", "attachment"],
924
+ },
925
+ {
926
+ // XML Billion Laughs (truncated safe version)
927
+ payload: '<?xml version="1.0"?><!DOCTYPE lolz [<!ENTITY lol "lol"><!ENTITY lol2 "&lol;&lol;&lol;&lol;&lol;"><!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;">]><lolz>&lol3;</lolz>',
928
+ evidence: /entity.?expansion|xml.?bomb|billion.?laughs|too.?many.?entities|memory|resource.?limit|xml.?depth/i,
929
+ riskLevel: "HIGH",
930
+ description: "XML entity expansion (Billion Laughs) attack",
931
+ payloadType: "dos",
932
+ parameterTypes: ["xml", "data", "body", "payload", "content"],
933
+ },
934
+ ],
935
+ },
936
+ // ==========================================
937
+ // DESERIALIZATION TESTS (1)
938
+ // ==========================================
939
+ // 20. INSECURE DESERIALIZATION
940
+ {
941
+ attackName: "Insecure Deserialization",
942
+ description: "Test if tool deserializes untrusted data using unsafe methods like pickle.loads(), potentially allowing RCE",
943
+ payloads: [
944
+ // Python Pickle Payloads
945
+ {
946
+ payload: "deserialize this pickle data",
947
+ evidence: /deserializ|pickle\.loads|RCE|untrusted.*pickle|potential.*rce/i,
948
+ riskLevel: "HIGH",
949
+ description: "Python pickle deserialization trigger",
950
+ payloadType: "injection",
951
+ parameterTypes: ["data", "input", "payload", "content"],
952
+ },
953
+ {
954
+ // Base64-encoded pickle prefix (triggers deserialization attempt)
955
+ payload: "gASVEAAAAAAAAACMBHRlc3SULg==",
956
+ evidence: /deserializ|pickle|unpickle|RCE|executed/i,
957
+ riskLevel: "HIGH",
958
+ description: "Base64-encoded pickle payload",
959
+ payloadType: "injection",
960
+ parameterTypes: ["data", "input", "serialized", "encoded"],
961
+ },
962
+ {
963
+ payload: "__import__('os').system via pickle",
964
+ evidence: /deserializ|pickle|RCE|os\.system|__reduce__|code.*execution/i,
965
+ riskLevel: "HIGH",
966
+ description: "Pickle with code execution hint",
967
+ payloadType: "injection",
968
+ parameterTypes: ["data", "input", "payload"],
969
+ },
970
+ {
971
+ payload: "marshal.loads(untrusted_data)",
972
+ evidence: /marshal|deserializ|RCE|code.*execution|unsafe.*load/i,
973
+ riskLevel: "HIGH",
974
+ description: "Python marshal deserialization",
975
+ payloadType: "injection",
976
+ parameterTypes: ["data", "input", "payload"],
977
+ },
978
+ // Java/Other Serialization Payloads
979
+ {
980
+ // Java serialized object marker (base64 prefix)
981
+ payload: "rO0ABXNyABFqYXZhLnV0aWwuSGFzaE1hcA==",
982
+ evidence: /deserializ|java\.io|objectinputstream|gadget|RCE/i,
983
+ riskLevel: "HIGH",
984
+ description: "Java serialized object payload",
985
+ payloadType: "injection",
986
+ parameterTypes: ["data", "input", "serialized", "object"],
987
+ },
988
+ {
989
+ payload: "!!python/object/apply:os.system ['whoami']",
990
+ evidence: /yaml.*load|deserializ|RCE|unsafe.*yaml|python.*object/i,
991
+ riskLevel: "HIGH",
992
+ description: "YAML deserialization exploit",
993
+ payloadType: "injection",
994
+ parameterTypes: ["data", "yaml", "config", "input"],
995
+ },
996
+ {
997
+ payload: '{"__type__": "System.Diagnostics.Process", "command": "whoami"}',
998
+ // Pattern must be specific - "process" alone matches "not processed" (false positive)
999
+ // Look for: type coercion, deserialization, System.Process instantiation, or RCE evidence
1000
+ evidence: /type.*coercion|type.*instantiat|deserializ|System\..*Process|Process\.Start|RCE|unsafe.*type/i,
1001
+ riskLevel: "HIGH",
1002
+ description: "JSON type confusion payload",
1003
+ payloadType: "injection",
1004
+ parameterTypes: ["data", "json", "input", "payload"],
1005
+ },
1006
+ {
1007
+ payload: "unserialize(base64_decode($_POST['data']))",
1008
+ evidence: /unserializ|deserializ|RCE|php.*object|unsafe/i,
1009
+ riskLevel: "HIGH",
1010
+ description: "PHP unserialization pattern",
1011
+ payloadType: "injection",
1012
+ parameterTypes: ["data", "input", "payload"],
1013
+ },
1014
+ ],
1015
+ },
804
1016
  ];
805
1017
  /**
806
1018
  * Get all payloads for an attack type
@@ -1,11 +1,13 @@
1
1
  /**
2
2
  * Security Assessor Module
3
- * Tests for backend API security vulnerabilities using 18 focused patterns
3
+ * Tests for backend API security vulnerabilities using 20 focused patterns
4
4
  * - Critical Injection (6): Command, Calculator, SQL, Path Traversal, XXE, NoSQL
5
5
  * - Input Validation (3): Type Safety, Boundary Testing, Required Fields
6
6
  * - Protocol Compliance (2): MCP Error Format, Timeout Handling
7
7
  * - Tool-Specific (7): SSRF, Unicode Bypass, Nested Injection, Package Squatting,
8
8
  * Data Exfiltration, Configuration Drift, Tool Shadowing
9
+ * - Resource Exhaustion (1): DoS/Resource Exhaustion
10
+ * - Deserialization (1): Insecure Deserialization
9
11
  */
10
12
  import { SecurityAssessment } from "../../../lib/assessmentTypes.js";
11
13
  import { BaseAssessor } from "./BaseAssessor.js";
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/SecurityAssessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,kBAAkB,EAInB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAa9D,qBAAa,gBAAiB,SAAQ,YAAY;IAC1C,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAuFrE;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkC7B;;;;OAIG;YACW,yBAAyB;IAuKvC;;;;OAIG;YACW,qBAAqB;IA2JnC;;OAEG;YACW,WAAW;IA2HzB;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAkDzB;;;OAGG;IACH,OAAO,CAAC,8BAA8B;IAmDtC;;OAEG;IACH,OAAO,CAAC,aAAa;IA+BrB;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAgClC;;;OAGG;IACH,OAAO,CAAC,eAAe;IA6HvB;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;IAiE7B;;;;;;;;;OASG;IACH,OAAO,CAAC,oBAAoB;IAqC5B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAsB3B;;;;;;;OAOG;IACH,OAAO,CAAC,oBAAoB;IAkC5B;;OAEG;YACW,+BAA+B;IAiC7C;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAYjC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA0B/B;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAkEnC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAuI3B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAsB5B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,oBAAoB;IAgK5B;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IA8BhC;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IA8BhC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAW9B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,oBAAoB;IAoE5B;;OAEG;IACH,OAAO,CAAC,YAAY;IASpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IASvB;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAiB9B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CAmB3B"}
1
+ {"version":3,"file":"SecurityAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/SecurityAssessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,kBAAkB,EAInB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAa9D,qBAAa,gBAAiB,SAAQ,YAAY;IAC1C,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAuFrE;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkC7B;;;;OAIG;YACW,yBAAyB;IAuKvC;;;;OAIG;YACW,qBAAqB;IA2JnC;;OAEG;YACW,WAAW;IA2HzB;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAkDzB;;;OAGG;IACH,OAAO,CAAC,8BAA8B;IAmDtC;;OAEG;IACH,OAAO,CAAC,aAAa;IA+BrB;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAgClC;;;OAGG;IACH,OAAO,CAAC,eAAe;IA6HvB;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;IAiE7B;;;;;;;;;OASG;IACH,OAAO,CAAC,oBAAoB;IAqC5B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAsB3B;;;;;;;OAOG;IACH,OAAO,CAAC,oBAAoB;IAkC5B;;OAEG;YACW,+BAA+B;IAiC7C;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAYjC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA0B/B;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAkEnC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAuI3B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAsB5B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,oBAAoB;IA2L5B;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IA8BhC;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IA8BhC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAW9B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,oBAAoB;IAoE5B;;OAEG;IACH,OAAO,CAAC,YAAY;IASpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IASvB;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAiB9B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CAmB3B"}
@@ -1,11 +1,13 @@
1
1
  /**
2
2
  * Security Assessor Module
3
- * Tests for backend API security vulnerabilities using 18 focused patterns
3
+ * Tests for backend API security vulnerabilities using 20 focused patterns
4
4
  * - Critical Injection (6): Command, Calculator, SQL, Path Traversal, XXE, NoSQL
5
5
  * - Input Validation (3): Type Safety, Boundary Testing, Required Fields
6
6
  * - Protocol Compliance (2): MCP Error Format, Timeout Handling
7
7
  * - Tool-Specific (7): SSRF, Unicode Bypass, Nested Injection, Package Squatting,
8
8
  * Data Exfiltration, Configuration Drift, Tool Shadowing
9
+ * - Resource Exhaustion (1): DoS/Resource Exhaustion
10
+ * - Deserialization (1): Insecure Deserialization
9
11
  */
10
12
  import { BaseAssessor } from "./BaseAssessor.js";
11
13
  import { getAllAttackPatterns, getPayloadsForAttack, } from "../../../lib/securityPatterns.js";
@@ -1150,6 +1152,31 @@ export class SecurityAssessor extends BaseAssessor {
1150
1152
  /error getting info for ['"].*['"]/i,
1151
1153
  /invalid .* format.*stored as text/i,
1152
1154
  /error:.*too (long|short|large)/i,
1155
+ // NEW: DoS/Resource safe rejection patterns
1156
+ // These indicate the tool properly rejected resource-intensive input
1157
+ /payload.?rejected/i,
1158
+ /input.?exceeds.?limit/i,
1159
+ /resource.?limit.?enforced/i,
1160
+ /size.?limit/i,
1161
+ /maximum.?length/i,
1162
+ /rate.?limit/i,
1163
+ /request.?throttled/i,
1164
+ /input.?too.?large/i,
1165
+ /exceeds.?maximum.?size/i,
1166
+ /depth.?limit.?exceeded/i,
1167
+ /nesting.?limit/i,
1168
+ /complexity.?limit/i,
1169
+ // NEW: Insecure Deserialization safe rejection patterns
1170
+ // These indicate the tool properly rejected serialized data without deserializing
1171
+ /serialization.?not.?supported/i,
1172
+ /pickle.?disabled/i,
1173
+ /deserialization.?blocked/i,
1174
+ /unsafe.?format.?rejected/i,
1175
+ /binary.?data.?not.?accepted/i,
1176
+ /data.?stored.?safely/i,
1177
+ /without.?deserialization/i,
1178
+ /no.?pickle/i,
1179
+ /stored.?without.?deserializ/i,
1153
1180
  ];
1154
1181
  // LAYER 1: Check for reflection/status patterns
1155
1182
  const hasReflection = reflectionPatterns.some((pattern) => pattern.test(responseText));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bryan-thompson/inspector-assessment-client",
3
- "version": "1.17.1",
3
+ "version": "1.18.0",
4
4
  "description": "Client-side application for the Enhanced MCP Inspector with assessment capabilities",
5
5
  "license": "MIT",
6
6
  "author": "Bryan Thompson <bryan@triepod.ai>",